Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have a custom measure in powerbi that does 2 calculations and produces 2 values. This is the code
_Custom_Measure =
VAR Perc = ( do some calculation ) - this is the percentage
VAR Remains = 100-VAR2 - this is the 100 - % figure
RETURN
Perc & Remains
Except I get this weird output where I dont see the [Remains] displayed.
Can someone please explain how I can display 2 values [Perc] and [Remains] side by side like below :
[Sales] [Perc] [Remains]
Q1 70 30
Q2 80 20
etc
Maybe I need 2 separate measures?
Thanks in advance
Solved! Go to Solution.
You need to define two separate DAX measures, like this:
Perc = -- your logic here
DIVIDE([SomeValue], [TotalValue]) * 100
Remains =
100 - [Perc]
Just add all three fields: [Sales], [Perc], and [Remains] to the Values pane of a Table visual.
VAR stores the result of an expression as a named variable. The measure will only provide the output after return.
If you want the remains value, you need to create a remain measure.
Proud to be a Super User!
You need to define two separate DAX measures, like this:
Perc = -- your logic here
DIVIDE([SomeValue], [TotalValue]) * 100
Remains =
100 - [Perc]
Just add all three fields: [Sales], [Perc], and [Remains] to the Values pane of a Table visual.