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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
jesusssss
Helper II
Helper II

Cumulative ratio measure for two years from the month of 2019 to the month of 2022.

jesusssss_0-1666094932618.png

 



In this table we have the dates from 12-01-2019 to the current date and what we want to do is
an accumulated ratio of this table with which we try to get these measurements. A measure that indicates the total guarantees claimed in two years, that is,
the guarantees from January 2020-January 2022 from February 2020-February
2022 and so that the accumulated is done automatically with all the months. I await your response because I'm already desperate I don't know what else to try. Thank you very much.


 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@jesusssss , With help from a date table

 

Cumulative % = divide(CALCULATE(SUM(Table[Grt]),filter(all('Date'),'Date'[date] <=max('Date'[date]))), CALCULATE(SUM(Table[Grt]), all('Date') ) )

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

In the end you were right, it was the formula that you gave me nothing more than removing the last part

the formn: cumulative %= (calculate(sum(garantias[grt],filter(all('calendario'[fecha])))
Thank you very much and sorry for the inconvenience you are the best

@amitchandak 

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@jesusssss , With help from a date table

 

Cumulative % = divide(CALCULATE(SUM(Table[Grt]),filter(all('Date'),'Date'[date] <=max('Date'[date]))), CALCULATE(SUM(Table[Grt]), all('Date') ) )

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

In the end you were right, it was the formula that you gave me nothing more than removing the last part

the formn: cumulative %= (calculate(sum(garantias[grt],filter(all('calendario'[fecha])))
Thank you very much and sorry for the inconvenience you are the best

@amitchandak 

First of all thank you very much for trying to solve our problem, we have tried
to use that command that you have put but it does not work. I enclose the measurement that you have given me but it does not work for me
even so I think that perhaps I have been able to put some wrong data. These images that I attach correspond to the formula that we want to carry
out in Excel and the tables that are seen more clearly in the power bi. This is the formula that we have in Excel to calculate the indicator of total guarantees
for 2 years in case it helps you. =IF(D27>0;C43+D27-'2020'!D11;"") This is the calendar where we get the dates.
This is the chart we want what happens is that in this case the data is wrong
because the indicator should go above the red trend line
I enclose a pdf with my answer so that it can be seen more clearly than here Thank you very much again and I look forward to your response.imagen_2022-10-19_123955361.png

 imagen_2022-10-19_124018137.png

 

imagen_2022-10-19_124022497.png

 

imagen_2022-10-19_124027351.png

 

imagen_2022-10-19_124033681.png

 

imagen_2022-10-19_124038610.png

 

@jesusssss ,


Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Here I give you the tables with all the data in the 2020 capture where the graph is there I have put the excel formula and all the data we use is in yellow

imagen_2022-10-19_134629322.png

 

imagen_2022-10-19_134640397.png

 

imagen_2022-10-19_134656480.png

 

imagen_2022-10-19_134708835.png

 

@amitchandak Do you know how we could do the  measure?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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