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.
Hello,
I have dimension table like down below and a measure to countrows from fact table for each representation (and LY in another meausure)
Zone | Category |
Europe | Global |
Asia | Global |
America | Global |
Local Grocery | Local |
Local Automotive | Local |
Local HR | Local |
My aim is to create a chart where I can get global category in the axis and local as a grouped value under one bucket
Is there a possibility to do that?
Solved! Go to Solution.
Hi,
One of ways to achieve this is to create a Axis table like below, and write a measure by using TREATAS function.
Pleases check the below picture and the attached pbix file.
Value measure: =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Axis'[Axis] ) = "Local",
CALCULATE (
SUM ( 'Fact'[Value] ),
TREATAS ( VALUES ( 'Axis'[Axis] ), Zone[Category] )
),
CALCULATE (
SUM ( 'Fact'[Value] ),
TREATAS ( VALUES ( 'Axis'[Axis] ), Zone[Zone] )
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
One of ways to achieve this is to create a Axis table like below, and write a measure by using TREATAS function.
Pleases check the below picture and the attached pbix file.
Value measure: =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Axis'[Axis] ) = "Local",
CALCULATE (
SUM ( 'Fact'[Value] ),
TREATAS ( VALUES ( 'Axis'[Axis] ), Zone[Category] )
),
CALCULATE (
SUM ( 'Fact'[Value] ),
TREATAS ( VALUES ( 'Axis'[Axis] ), Zone[Zone] )
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you, really cool work! 🙂
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |