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.
We have the following visual that someone wants to add into Power BI
we have a problem here because
X Axis uses Quarter
Then uses Financial Year for the second half of the visual
Y Axis (The measure)
Uses Sum(Total Facts)
And then for the next section uses Average(Future Facts)
Its basically two visuals merged into one.
Just on the offchance. Does anyone have an idea how this could be accomplished in Power BI?
Hi @DebbieE
You may add a disconnected table to have all X-axis values similar to below,
Then create a measure similar to
result =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Table'[Year] ) = "21-22",
CALCULATE (
SUM ( 'FactTable'[value] ),
'FactTable'[Year] = SELECTEDVALUE ( 'Table'[Year] ),
'FactTable'[Quarter] = SELECTEDVALUE ( 'Table'[Quarter] )
),
SELECTEDVALUE ( 'Table'[Year] ) = "22-23",
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Table'[Quarter] ) IN { "Q1", "Q2" },
CALCULATE (
SUM ( 'FactTable'[value] ),
'FactTable'[Year] = SELECTEDVALUE ( 'Table'[Year] ),
'FactTable'[Quarter] = SELECTEDVALUE ( 'Table'[Quarter] )
),
CALCULATE (
AVERAGE ( 'FactTable'[value] ),
'FactTable'[Year] = SELECTEDVALUE ( 'Table'[Year] )
)
),
CALCULATE (
AVERAGE ( 'FactTable'[value] ),
'FactTable'[Year] = SELECTEDVALUE ( 'Table'[Year] )
)
)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Its looking ok but I dont want to have to hard code the years into the measure. Is there any way that I could change this so I dont have to hard code the years in because obviously this does change and the further we go the more years will have to be hard coded
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 |
---|---|
107 | |
99 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |