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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
v-xinruzhu-msft
Community Support
Community Support

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.