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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Measure for Line diagramm

Hi!

 

I am kind of new to PowerBI and I wanted to do a ratio. So I figured I can divide somehow like this:

 

Test = 1 - DIVIDE(CALCULATE(COUNT('Table1'[A]), FILTER('Table1','Table1'[A] = "Closed")),COUNT('Table1'[B]))
 
This works perfectly fine with cards, because PowerBI calculates ALL "Closed" Cases by the number of all cases,
but I want to show it in a line diagramm and the calculation does something i did not expect:
 
It calculates:
All closed cases on a date / All cases on a date
 
But what I wanted to do is the following:
All closed cases UNTIL a date / All cases UNTIL a date
 
All help is very appreciated!
 
Best regards
MSOMME
1 ACCEPTED SOLUTION
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous ,

You can create a Running Total measures for them: For ex:

Test=
Var A= CALCULATE(CALCULATE(COUNT('Table1'[A]), FILTER('Table1','Table1'[A] = "Closed")), FILTER(ALLSELECTED(Table1[Date]), Date <= MAX( Table[Date])))

Var B= CALCULATE(COUNT('Table1'[B]), FILTER(ALLSELECTED(Table1[Date]), Date <= MAX( Table[Date])))

Return (1- DIVIDE(A,B))

 

I hope this helps!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

That worked as solution. Thank you! 🙂

Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous ,

You can create a Running Total measures for them: For ex:

Test=
Var A= CALCULATE(CALCULATE(COUNT('Table1'[A]), FILTER('Table1','Table1'[A] = "Closed")), FILTER(ALLSELECTED(Table1[Date]), Date <= MAX( Table[Date])))

Var B= CALCULATE(COUNT('Table1'[B]), FILTER(ALLSELECTED(Table1[Date]), Date <= MAX( Table[Date])))

Return (1- DIVIDE(A,B))

 

I hope this helps!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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