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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
JbPa33
Helper I
Helper I

Compare 2 measures with each other

Hello,

 

I would like to display a listing of contracts according to a selectedValue :

JbPa33_0-1686824691189.png

On the left, there is a slicer to choose the Threshold and I would like, in the right table, display the contract which have a rate inferior than the Threshold. The Data "Rate" is a measure, i tried to create a New measure "Display = if([rate] < selectedvalue(Threshold rate),"Yes","No")" but it doesn't work because this measure compare the total values.

 

How I could do to display only the contracts which have a rate inferior than the threshold choosen  ?

 

Thank you 

1 ACCEPTED SOLUTION
JbPa33
Helper I
Helper I

I find the solution  : 

Mesure =
VAR Threshold = SELECTEDVALUE(Threshold[Threshold Rate])
VAR Rate = ROUND(sum('Octroi fintake'[Assiette_TN])/sum('Octroi fintake'[Montant DF]),3) /*Calcul for my measure*/
VAR Display = if(Rate<Threshold,"yes","no")
RETURN Display

View solution in original post

3 REPLIES 3
JbPa33
Helper I
Helper I

I find the solution  : 

Mesure =
VAR Threshold = SELECTEDVALUE(Threshold[Threshold Rate])
VAR Rate = ROUND(sum('Octroi fintake'[Assiette_TN])/sum('Octroi fintake'[Montant DF]),3) /*Calcul for my measure*/
VAR Display = if(Rate<Threshold,"yes","no")
RETURN Display
Mahesh0016
Super User
Super User

@JbPa33 i think you should use meausure 

IF Threshold =
IF([Total Rate]<[Total Threshold],"yes","no")
 

Mahesh0016_0-1686828545972.png

 

Thank you for your answer but I have already tried to use a measure and it doesn't work. In your example, "Total Threshold" isn't a constant whereas in my report, this value is selected by a slicer.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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