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
Solved! Go to Solution.
Hi @shibabrata27 ,
Add a calculated column in dataset table to always identify the latest quarter.
Rank quarter = RANKX ( 'Dataset', 'Dataset'[Quarter],, DESC, DENSE )
Add below measure into table visual and set its value to 0.
check =
VAR Per_Account =
CALCULATE (
SUM ( 'Dataset'[Margin] ),
FILTER ( 'Dataset', 'Dataset'[Rank quarter] = 1 )
)
/ CALCULATE (
SUM ( 'Dataset'[Revenue] ),
FILTER ( 'Dataset', 'Dataset'[Rank quarter] = 1 )
)
VAR All_Account =
CALCULATE (
SUM ( 'Dataset'[Margin] ),
FILTER ( ALLSELECTED ( 'Dataset' ), 'Dataset'[Rank quarter] = 1 )
)
/ CALCULATE (
SUM ( 'Dataset'[Revenue] ),
FILTER ( ALLSELECTED ( 'Dataset' ), 'Dataset'[Rank quarter] = 1 )
)
RETURN
IF ( Per_Account < All_Account, 0, 1 )
Best regards,
Yuliana Gu
Hi @shibabrata27 ,
Since the original question has been resolved, please kindly mark the helpful reply as an answer so that it can benefit more users. For any further question, I would suggest you post a new thread on forum so that more community members can view it and provide advice.
Best regards,
Yuliana Gu
Hi @shibabrata27 ,
Add a calculated column in dataset table to always identify the latest quarter.
Rank quarter = RANKX ( 'Dataset', 'Dataset'[Quarter],, DESC, DENSE )
Add below measure into table visual and set its value to 0.
check =
VAR Per_Account =
CALCULATE (
SUM ( 'Dataset'[Margin] ),
FILTER ( 'Dataset', 'Dataset'[Rank quarter] = 1 )
)
/ CALCULATE (
SUM ( 'Dataset'[Revenue] ),
FILTER ( 'Dataset', 'Dataset'[Rank quarter] = 1 )
)
VAR All_Account =
CALCULATE (
SUM ( 'Dataset'[Margin] ),
FILTER ( ALLSELECTED ( 'Dataset' ), 'Dataset'[Rank quarter] = 1 )
)
/ CALCULATE (
SUM ( 'Dataset'[Revenue] ),
FILTER ( ALLSELECTED ( 'Dataset' ), 'Dataset'[Rank quarter] = 1 )
)
RETURN
IF ( Per_Account < All_Account, 0, 1 )
Best regards,
Yuliana Gu
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.