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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
YavuzDuran
Helper III
Helper III

Slicers are damaging the cumulative line

Hi All

 

I have this chart showing a cumulative parameter 

YavuzDuran_0-1628786236146.png

with a measure : 

Charge Off % - Cumulative v2.0 = divide(calculate(sum(SalesDashboard[IsChargeOff]),filter(all(SalesDashboard[Loan Life (Month Period)]),SalesDashboard[Loan Life (Month Period)]<=max(SalesDashboard[Loan Life (Month Period)]))),calculate(countrows(SalesDashboard),allselected('SalesDashboard'[Loan Life (Month Period)])),0)
But whenever I play with one of those slicers, ie. Cash Down %
The graph does not seem to have a cumulative line
 
YavuzDuran_1-1628787002478.png

 

What might be the issue

please help

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @YavuzDuran ,

You can change the all() inside to allselect().

Charge Off % - Cumulative v2.0 = divide(calculate(sum(SalesDashboard[IsChargeOff]),filter(allselected (SalesDashboard[Loan Life (Month Period)]),SalesDashboard[Loan Life (Month Period)]<=max(SalesDashboard[Loan Life (Month Period)]))),calculate(countrows(SalesDashboard),allselected('SalesDashboard'[Loan Life (Month Period)])),0)

If it does not meet your expected results, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Best Regards,

Liu Yang

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

goncalogeraldes
Super User
Super User

I would advise to use variables for the measure to parse through rather than the formula you have. For example:

 

Charge Off % - Cumulative v2.0 = 
var sales_charge_off = calculate(sum(SalesDashboard[IsChargeOff]),filter(all(SalesDashboard[Loan Life (Month Period)]),SalesDashboard[Loan Life (Month Period)]<=max(SalesDashboard[Loan Life (Month Period)])))

var count_rows = calculate(countrows(SalesDashboard),allselected('SalesDashboard'[Loan Life (Month Period)]))

return
divide(sales_charge_off,count_rows)

 

 

Hope this answer solves your problem! If you need any additional help please tag me in your reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
Thanks!

Best regards,
Gonçalo Geraldes

Did not work

@goncalogeraldes 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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