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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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