Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello Team,
I have Sales Transaction against Customer with Status "Y" or "N" for 202203.
The Status changed against Customer Code in the month 202305.
I want to take the sum of Sales(202305) for Customer Codes for which Status has been changed.It's a Measure.
Here I'm attaching the snapshot for Reference.
My Selected Month is 202305 , I want to calculate Sales only for AB101,AB102 and AB108 because for these Customer Codes in 202203 the status is N.
Help me out on this.
TIA
Hi,
Share data in a format that can be pasted in an MS Excel file.
@likhithar , Try a measure like
Measure =
var _max = calculate(lastnonblankvalue(Table[YYYYMM], Max(Table[Status])), filter(all(Table), Table[Customer] = max(Table[Customer Code]) ) )
return
countx(values(Table[Customer Code]), if(_max <> Max(Table[Status]), Table[Customer Code], blank()) )
We can add logic of Y and N if needed for current and past status
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |