Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I want to present the 'count of item number' of the previous report date and show the % difference. So for report date 06/12/2020 the record should be blank and for report date 13/12/2020 the new record should show 19, so that I am able to calculate the difference. In this case (14-19)/19 = -26%. What column based calculation and/or measure can I implement? I am working on direct query!
Solved! Go to Solution.
Hi @Anonymous ,
Create a measure like so:
Measure =
VAR ThisDate =
    MAX ( 'Table'[Report Date] )
VAR PreDate =
    CALCULATE ( MAX ( 'Table'[Report Date] ), 'Table'[Report Date] < ThisDate )
VAR PreCount =
    CALCULATE ( COUNT ( 'Table'[Item Number] ), 'Table'[Report Date] = PreDate )
VAR ThisCount =
    COUNT ( 'Table'[Item Number] )
RETURN
    DIVIDE ( ThisCount - PreCount, PreCount )
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
Hi @Anonymous ,
Create a measure like so:
Measure =
VAR ThisDate =
    MAX ( 'Table'[Report Date] )
VAR PreDate =
    CALCULATE ( MAX ( 'Table'[Report Date] ), 'Table'[Report Date] < ThisDate )
VAR PreCount =
    CALCULATE ( COUNT ( 'Table'[Item Number] ), 'Table'[Report Date] = PreDate )
VAR ThisCount =
    COUNT ( 'Table'[Item Number] )
RETURN
    DIVIDE ( ThisCount - PreCount, PreCount )
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.