Forum Discussion
filipe197
8 years agoFrequent Visitor
How to use button to modify measure
Hello, I want to set a measure (i will call it Rate) but i wanna somehow link it to a button that could consider or not one of the parcels (or set it to zero). In the example below the measure is t...
- 8 years ago
Hi filipe197,
There is a slicer visual in Power BI rather than a button. You can try it in this file.
1. An independent table Buttons.
Yes
No
2. A measure.
Result = IF ( HASONEVALUE ( Buttons[Button] ), IF ( VALUES ( Buttons[Button] ) = "Yes", DIVIDE ( SUMX ( 'Table1', 'Table1'[Costs] + Table1[Manual Movements] ), SUM ( Table1[Income] ), 0 ), DIVIDE ( SUM ( Table1[Costs] ), SUM ( Table1[Income] ), 0 ) ), BLANK () )Best Regards,
Dale
v-jiascu-msft
8 years agoMicrosoft Employee
Hi filipe197,
There is a slicer visual in Power BI rather than a button. You can try it in this file.
1. An independent table Buttons.
Yes
No
2. A measure.
Result =
IF (
HASONEVALUE ( Buttons[Button] ),
IF (
VALUES ( Buttons[Button] ) = "Yes",
DIVIDE (
SUMX ( 'Table1', 'Table1'[Costs] + Table1[Manual Movements] ),
SUM ( Table1[Income] ),
0
),
DIVIDE ( SUM ( Table1[Costs] ), SUM ( Table1[Income] ), 0 )
),
BLANK ()
)
Best Regards,
Dale
- filipe1978 years agoFrequent Visitorv-jiascu-msftyou rule !! It has worked!!