cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Change Mensure

Hello everyone, 

 

I want to know, if is possible to change a mensure with a button or something like that.

 

For example:

 

I have a chart with the total amount (monetary) of sales. I want to put a button that I can change the mensure of this calc (showing the value in Dolar or in Euro). If I select Dolar, so the mensure is (Price*amount); if I select dolar, so it is: (Price*amount*Euro Value).

 

Sincerely, Luiz Bisco

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Change Mensure

@Bisco

 

You can do this with the help of a small parameter table.

Set up a new Table by manually entering data

 

Currency

Dollar

Euro

 

Now Create a slicer using this table. Then you can write a DYNAMIC MEASURE like

 

DYNAMIC_MEASURE =
IF (
    SELECTEDVALUE ( TableName[Currency] ) = "Dollar",
    YourMeasure1,
    IF ( SELECTEDVALUE ( TableName[Currency] ) = "EURO", YourMeasure2 )
)

See this post for more details

 

http://www.excelnaccess.com/power-of-values-function/

 

Try my new Power BI game Cross the River

View solution in original post

1 REPLY 1
Highlighted
Super User III
Super User III

Re: Change Mensure

@Bisco

 

You can do this with the help of a small parameter table.

Set up a new Table by manually entering data

 

Currency

Dollar

Euro

 

Now Create a slicer using this table. Then you can write a DYNAMIC MEASURE like

 

DYNAMIC_MEASURE =
IF (
    SELECTEDVALUE ( TableName[Currency] ) = "Dollar",
    YourMeasure1,
    IF ( SELECTEDVALUE ( TableName[Currency] ) = "EURO", YourMeasure2 )
)

See this post for more details

 

http://www.excelnaccess.com/power-of-values-function/

 

Try my new Power BI game Cross the River

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Power BI Desktop August 2020 Update

Power BI Desktop August 2020 Update

We have great updates this month! Click the link for the video with more info.

Top Solution Authors
Top Kudoed Authors