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.
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?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
37 | |
25 | |
19 | |
14 | |
8 |
User | Count |
---|---|
68 | |
48 | |
45 | |
18 | |
15 |