Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello Everyone, hope you are ending a great year.
I've a new requirement which I'm struggling to accomplish.
We need to add a "metric" as a column header in a matrix.
The report table is described in the image.
As you can see I've a dimension client, which I use a column headers, then I have a dimension brands, which I use as row header.
I have a facts table described with this 2 dimensions plus a date dimension.
Then I have 4 metrics (MTD, MTDvs Budget, YTD , YTD Vs Budget). I've already calculated them and they look fine. But the business requires that each Column header to have the % of the total of the column.
As you can see in the example, each column header has the value % calculated as (Grand Total MTD / The client total MTD) This is the total of all MTDS of the table, divided the corresponding ones of the client.
Even though Im still working on the metric, my main issue is how to use is as a column header.
Has anyone faced something similar ?
Looking forward for your feedback.
Happy new year !
Regards,
GV
In general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...
For you, create a table like:
Metric
MTD
MTD Vs Budget
YTD
YTD vs Budget
Then you would create a measure that refers to your other measures. So, something along the lines of:
Metric to Show = VAR __metric = MAX('Table'[Metric]) RETURN SWITCH(__metric, "MTD",[MTD], "MTD Vs Budget",[MTD Vs Budget], "YTD",[YTD], "YTD vs Budget",[YTD vs Budget], BLANK() )
This assumes that you have measures named [MTD], [MTD Vs Budget], etc. You would use the Metric column as a column in your matrix. So, the VAR gets the maximum value, which is to say the value in the column and then uses that to decide which of your 4 measures to display.
Hi Greg,
Thank you for your reply.
I'm not sure that this will solve my issue.
If you look at the image, I need to show the 4 metrics, for each client. This is not the issue.
What I'm unable to do, is to show the percentage on top of the client. This percentage is a metric, than should vary with the context of the slicers. This metric is variable. So I'm able to create the metric and use it a a Value of the matrix, but Im unable to use it as a column header in a matrix.
Regards,
GV
User | Count |
---|---|
115 | |
73 | |
60 | |
48 | |
47 |
User | Count |
---|---|
173 | |
123 | |
60 | |
59 | |
57 |