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
"Firstly i explain about my data i have data till 2016 to today
table -cube target
this is my data table here sold to partner code is dealer and invoice quantity is sale my date start from 2016 so i mention it everywhere."
i want to create a measure that calculate new dealer count that if i select november month of 22 then the created measure check all my data table and give me only count of those dealer that was not present in my table from 2016 to oct month it means it only return the new dealer count which was not present in all previous month as similar
when i select oct month of 22 it returns that new coustmer count that was not present in all data from 2016 to sep 2022
Solved! Go to Solution.
The below measure assumes that there is a relationship from your calendar table to the fact table
Num new dealers =
VAR EndDate =
EOMONTH ( MAX ( 'Calendar'[Date] ), -1 )
VAR PrevDealers =
CALCULATETABLE (
VALUES ( 'CUBE_TARGET'[D_PARTNER_PARTNER_CODE] ),
REMOVEFILTERS ( 'Calendar' ),
'Calendar'[Date] <= EndDate
)
VAR CurrentDealers =
VALUES ( 'CUBE_TARGET'[D_PARTNER_PARTNER_CODE] )
RETURN
COUNTROWS ( EXCEPT ( CurrentDealers, PrevDealers ) )
The below measure assumes that there is a relationship from your calendar table to the fact table
Num new dealers =
VAR EndDate =
EOMONTH ( MAX ( 'Calendar'[Date] ), -1 )
VAR PrevDealers =
CALCULATETABLE (
VALUES ( 'CUBE_TARGET'[D_PARTNER_PARTNER_CODE] ),
REMOVEFILTERS ( 'Calendar' ),
'Calendar'[Date] <= EndDate
)
VAR CurrentDealers =
VALUES ( 'CUBE_TARGET'[D_PARTNER_PARTNER_CODE] )
RETURN
COUNTROWS ( EXCEPT ( CurrentDealers, PrevDealers ) )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 13 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |