Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
bdehning
Post Prodigy
Post Prodigy

Modify Count and Sum Measure

If I wanted to remove the Sum portion of this measure which first looks at Count and then uses Sum, how do I modify the measure below?
 
I would like to just have it use the Count of Total Gross Incurred. 
 
Sort measure Count Policy Year Cause =
VAR _FreqByPolicyYear = CALCULATE([Count of Total Gross Incurred], FILTER(ALL(InjuryCause[Cause Grouping]), [Top 3 by frequency and Incurred]<4))
VAR _LN = LEN(FORMAT(CALCULATE([Count of Total Gross Incurred], ALL('LossRun'[Policy Inception Date])), "text"))
VAR _Pre = _FreqByPolicyYear *POWER(10, _LN*2)
VAR _Inc = CALCULATE(RANKX(ALLSELECTED(LossRun[Policy Inception Date]), [Sum of Total Gross Incurred],,ASC,Dense), ALLSELECTED(InjuryCause[Cause Grouping]))
VAR _Mid = _Inc * POWER(10, _LN)
RETURN
IF(ISBLANK([Count of Total Gross Incurred]), BLANK(), _Pre + _Mid + RANKX(ALLSELECTED(InjuryCause[Cause Grouping]),[Ref],,ASC,Skip))
1 REPLY 1
Anonymous
Not applicable

Hi @bdehning 

Based on your description,  I am confused that what is your final goal, do you mean you want to remove the _Inc part in your code?

 

Best Regards!

Yolo Zhu

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.