Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, I'm failing to create a measure. My data table looks like this:
Scenario | KPI | Value |
AC | Revenue | 50 |
AC | Costs | 20 |
AC | Sales amount | 10 |
For Scenario = AC and for each KPI the measure should calculate the value divided by the value of the Sales amount. This would return 5 for Revenue and 2 for Costs.
Hi, @BKBO04
try below measure
Measure 3 =
var a = CALCULATE(SUM('Table (2)'[Value]), 'Table (2)'[KPI]="sales amount",'Table (2)'[Scenario]=MAX('Table (2)'[Scenario]))
return
IF(MAX('Table (2)'[KPI])="sales amount",MAX('Table (2)'[Value]),DIVIDE(MAX('Table (2)'[Value]),a))
Does not work for me. It just returns one value for total.
I use the Zebra BI table visuals with seperate buckets where I would put the AC, PL and FC measure so that I get three columns for each scenario.
Hi @BKBO04 one of possible solutions: create 2 separate measure as following and you should have output as below.
Adjust MyTable name to your table name.
Proud to be a Super User!
Thanks for your suggestion, but this was a simplified example. In reality I have more KPI than just Revenue an Costs. So the measure should work for each KPI.
In a table visual.
KPI | Value by amount |
Revenue | 5 |
Cost | 2 |
how do you plan to present your measure?
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |