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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. 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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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