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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Division for selected values in measure

Hi all,

 

I'm trying to division between two calculated measures . Below two columns are calculated measures 

measure1            measure2

0.93                            1.036

0.154                          0.570

0.00                            0.094

0.00                            0.339

 

Here is the output I need in one measure i.e 1.036/0.93,0.570/0.154,0.094/0.154,0.339/0.154 .

 

please help me out

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can try to create measures like DAX below

 

Measure 1_noblank =

var _lastmeasure=CALCULATE(MAX(Table1[Index]),FILTER(ALL(Table1),Table1[Index]<MAX(Table1[Index])&&[Measure 1]<>0))

return

IF([Measure 1]=0,CALCULATE([Measure 1],FILTER(ALL(Table1),Table1[Index]=_lastmeasure)),[Measure 1])

 

Divide = DIVIDE(Table1[Measure 2],Table1[Measure 1_noblank])

 

Best Regards,

Amy

 

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

View solution in original post

1 REPLY 1
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can try to create measures like DAX below

 

Measure 1_noblank =

var _lastmeasure=CALCULATE(MAX(Table1[Index]),FILTER(ALL(Table1),Table1[Index]<MAX(Table1[Index])&&[Measure 1]<>0))

return

IF([Measure 1]=0,CALCULATE([Measure 1],FILTER(ALL(Table1),Table1[Index]=_lastmeasure)),[Measure 1])

 

Divide = DIVIDE(Table1[Measure 2],Table1[Measure 1_noblank])

 

Best Regards,

Amy

 

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.