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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
menphis21
Helper IV
Helper IV

Simple Waterfall, how i can use a measure with a switch function to make a button

Hello Everyone,

 

I have a table with a variable, value and also percents values.

I would like to create a button that can change the values of my graph simple waterfall. But it seemes that he is not able to accept measure.

Someone has a way to bypass this ?

 

thank you 🙂

 

My dax measure :

 

_Select Metric Capital Surplus = SWITCH(
true(),
"Percent" in ALLSELECTED('Metrics Capital Surplus'[Column1]), [_Sum Percent Capital Surplus],
"Values" in ALLSELECTED('Metrics Capital Surplus'[Column1]), [_Sum Value Capital Surplus] )

6 REPLIES 6
menphis21
Helper IV
Helper IV

HI @v-rzhou-msft , did you have the time to check ?

Thank you for your time

menphis21
Helper IV
Helper IV

Hi @v-rzhou-msft ,

 

Did you find a way to solve this issue ?

 

Thank you

v-rzhou-msft
Community Support
Community Support

Hi @menphis21 ,

 

I think you can create a slicer and show dynamic results by a measure.

Measure Type = 
{"Percent","Values"}

Measure:

Measure = 
VAR _SELECTION = SELECTEDVALUE('Measure Type'[Type])
RETURN
SWITCH(_SELECTION,
"Percent",[_Sum Percent Capital Surplus],
"Values",[_Sum Value Capital Surplus])

Result is as below

RicoZhou_0-1654499152913.png

RicoZhou_1-1654499170010.png

This way could show values in only one data type. If you want show values in number type and percent in %. I suggest you to try calculation group in Tabular Editor .

For reference:

Data Labels! Formatting 100.00% as 100%

 

Best Regards,
Rico Zhou

 

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

 

 

Hi

 

Thank your for your response.

 

First of all, i had to to create a data table by "Enter Data" because hi didnt accept me the measure in the selectedvalue function.

 

Also, it didnt want to accept me the measure in the waterfall chart. ( I use the simple waterfall plugin but i tried also with the native one and it doesnt work.) 

I put a screenshot to show you.

 

Thank you for your help

 

Waterfall measure.png

Hi @menphis21 ,

 

I think your issue should be caused by your data model. Can you share a sample file without sensitive data with me? And show me a screenshot with the result you want. This will make it easier for me to find the solution.

 

Best Regards,
Rico Zhou

 

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

Hi @v-rzhou-msft ,

 

Sorry for the delai, i think that my response was not published.

 

I attached you all the screenshot to understand what's the need. The data model is very simple... so i am curious to understand why it's not working

 

Here you can find the pbix file : https://mytransfer.mazars.fr/f.php?h=2LyV2SBU&d=1

Modele waterfall.PNG

Waterfall measure.png

Graph waterfall.PNG

   

data example.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.