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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
saitks99
Employee
Employee

How to calculate ratio for this scenario

My Question is :

 

saitks99_1-1600884524124.png

 

 

Actually, this is what I have, Forumula used for Ratio : 

Ratio = (CALCULATE(SUM(Query1[RenewalCount]),FILTER(Query1,Query1[EligibleTrackingDay] = 10)))
 
***I want 8488163 should be repeated in entire table, help me out !
1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

Hi, @saitks99 , pls try this

Ratio =
CALCULATE ( SUM ( Query1[RenewalCount] ), Query1[EligibleTrackingDay] = 10 )

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

4 REPLIES 4
CNENFRNL
Community Champion
Community Champion

Hi, @saitks99 , pls try this

Ratio =
CALCULATE ( SUM ( Query1[RenewalCount] ), Query1[EligibleTrackingDay] = 10 )

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

This worked, what is the difference with FILTER then ?

Hi, @saitks99 , in fact, it's EVALUATION CONTEXT which is in play here. I recommend a classic blog by Jeffrey Wang unveiling some essential details in this regard.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Icey
Community Support
Community Support

Hi @saitks99 ,

 

You can also try this:

Ratio = CALCULATE(SUM(Query1[RenewalCount]),FILTER(ALLSELECTED(Query1),Query1[EligibleTrackingDay] = 10))

 

It should work the same as what @CNENFRNL mentioned.

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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