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
Hi,
I have below data
requirement is based on selection slicer on month(filter) , the measure should compare the equipment data with previous month equipment and gives total counts .
so for example - in Slicer May-20 is selected
| Equipment | ProcessingDate |
| S1358 | Apr-20 |
| S3562 | Apr-20 |
| S3563 | Apr-20 |
| S3630 | Apr-20 |
| S3562 | May-20 |
| S3563 | May-20 |
| S3630 | May-20 |
| S8498 | May-20 |
| S8499 | May-20 |
| S3562 | Jun-20 |
| S3563 | Jun-20 |
| S8100 | Jun-20 |
any suggestion will be appreciated. thanks.
Solved! Go to Solution.
Hi @Anonymous ,
You can follow the below steps to achieve it. I just create a sample pbix file with all these steps, you can get it from this link.
1. Create a equipment dimension table
2. Create a measure as below to get the flag
Measure =
VAR _t =
CALCULATETABLE (
VALUES ( 'Table'[Equipment] ),
DATEADD ( 'Date'[Date], -1, MONTH ),
ALL ( 'Table' )
)
VAR _seledate =
CALCULATE (
MAX ( 'Table'[ProcessingDate] ),
FILTER ( ALL ( 'Table' ), 'Table'[Equipment] = MAX ( 'Equipment'[Equipment] ) )
)
RETURN
IF (
MAX ( Equipment[Equipment] ) IN VALUES ( 'Table'[Equipment] )
&& MAX ( Equipment[Equipment] ) IN _t,
"Data Exist",
IF (
NOT MAX ( Equipment[Equipment] ) IN _t
&& MAX ( Equipment[Equipment] ) IN VALUES ( 'Table'[Equipment] ),
"New Entry",
IF ( _seledate < MAX ( 'Date'[Date] ), "Loss Entry" )
)
)Best Regards
Rena
@Anonymous , if you date, use date calendar and time intelligence. You can have measure like this can calculate you logic.
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
Use isblank() to check if the value is not there in a month like
isblank([last MTD Sales])
@amitchandak , Unit is String and SUM is giving error.
@amitchandak and Experts,
I resolved above by changing SUM to count. Now with above two measure, I get count of current and previous month.
Ok now next steps is to have below logic..
Hi @Anonymous ,
You can follow the below steps to achieve it. I just create a sample pbix file with all these steps, you can get it from this link.
1. Create a equipment dimension table
2. Create a measure as below to get the flag
Measure =
VAR _t =
CALCULATETABLE (
VALUES ( 'Table'[Equipment] ),
DATEADD ( 'Date'[Date], -1, MONTH ),
ALL ( 'Table' )
)
VAR _seledate =
CALCULATE (
MAX ( 'Table'[ProcessingDate] ),
FILTER ( ALL ( 'Table' ), 'Table'[Equipment] = MAX ( 'Equipment'[Equipment] ) )
)
RETURN
IF (
MAX ( Equipment[Equipment] ) IN VALUES ( 'Table'[Equipment] )
&& MAX ( Equipment[Equipment] ) IN _t,
"Data Exist",
IF (
NOT MAX ( Equipment[Equipment] ) IN _t
&& MAX ( Equipment[Equipment] ) IN VALUES ( 'Table'[Equipment] ),
"New Entry",
IF ( _seledate < MAX ( 'Date'[Date] ), "Loss Entry" )
)
)Best Regards
Rena
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 25 |
| User | Count |
|---|---|
| 124 | |
| 87 | |
| 70 | |
| 66 | |
| 65 |