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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Camillanaep
Frequent Visitor

Dynamic calculate Measure value based on Slicer Selection

Hello everybody!

 

 

I have a query on my BI wich contains the columns:

 

Name of owner    Error      Situation

Paul                       1,0%

Maria                     5,4%

Laura                     2,1%

Pedro                    1,4%

Louis                     0,6%

 

This column "Situation" is a condicional column that tells me if this error is "OK" or "NOT OK". >>> If(Error>X; "Not OK"; "OK")

 

But sometimes this X (acceptable error) is 5%, sometimes is 4%, sometimes is 3%, sometimes is 2% and sometimes is 1%. 

 

So, i need to create a slicer with this values of X (5%, 4%, 3%, 2%, 1%), and when i click, for example, in 5%, my  situation column tells me if the Error is OK or NOT OK.

 

Can somebody help me?

 

1 ACCEPTED SOLUTION
Interkoubess
Solution Sage
Solution Sage

Hi @Camillanaep,

Please create your table ( I called mine Selection) and then create this measure in your main table (Pourcen):Pourc 

 

Pourc = var Test = if(HASONEVALUE(Selection[Type]),MIN(Selection[Type]),BLANK())
return 
IF(MIN(Data[Error])>Test,"OK","NOT OK")

Check image below:

Fin.PNG

 

Ninter

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

 

You have posted the same question here.  I have posted my solutin at that link.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Interkoubess
Solution Sage
Solution Sage

Hi @Camillanaep,

Please create your table ( I called mine Selection) and then create this measure in your main table (Pourcen):Pourc 

 

Pourc = var Test = if(HASONEVALUE(Selection[Type]),MIN(Selection[Type]),BLANK())
return 
IF(MIN(Data[Error])>Test,"OK","NOT OK")

Check image below:

Fin.PNG

 

Ninter

@Interkoubess

 

But now, as it is a measure, i'm not able to create a graph with my results of "Pourc". Do you have any idea of how can i use this new information to create a graph? (Like a pizza chart with "Count of Pourc", that changes when i change my filter of pourcentage)

 

Thank you!

thank you so much @Interkoubess and @Ashish_Mathur!!! I solved my problem!!!

Hi,

 

If my soltion helped, please mark it as Answer.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur

 

Ok Ashish, i will mark it as an answer.

 

I just have one more question, do you have any ideia of how can i transform this measure that you create into a column, so that i can create charts with this info?

 

Thank you!

Hi,

 

Thank you.  Why can you not create a chart with the calculated field formula?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I can't because it is a measure. I need it to be a column to use on charts. 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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