xorpower
xorpower

Reputation: 18963

MAX Function and Group BY in Power BI

I have dataset coming in below format. As you can see for Chase ID 522723, I have 2 dates viz 29/06 and 09/07. At present a single chase ID is going onto both the buckets as it is considering both the dates, I need to bring in the MAX date filtered out by Chase ID and Project ID.

Hence in below example, the bucket for chase ID for 522723 should be "QC".

enter image description here

I have tried below seen measure

enter image description here

This measure is giving me said result (see below) which is bringing incorrect result set

enter image description here

Can someone please assist me in creating MAX measure so that it "groups" by using ChaseID.

Upvotes: 2

Views: 12972

Answers (1)

ffffrank
ffffrank

Reputation: 544

using FILTER with CALCULATE in this case should be unnecessary, since CALCULATE already comes with Filters. Also using ALL will give you the MAX result of, well all the results. Use ALLEXCEPT and you will get results grouped by ChaseID.

Like this:

CALCULATE(MAX(CODINGTABLE[BLCreatedDate]),ALLEXCEPT(CODINGTABLE;CODINGTABLE[ChaseID]))

Upvotes: 5

Related Questions