Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
102 | |
91 | |
87 | |
79 | |
71 |
User | Count |
---|---|
113 | |
105 | |
101 | |
75 | |
64 |