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 a table similar to this one
I need a comparison table with 2 columns based on Year column, using two slicers for years.
So, I've created 2 tables for each slicer based on the year column using this thread: Re: Two slicer on same column
FilterTBL-Base = DISTINCT('DataTable'[Year])
FilterTBL-CompareTo = DISTINCT('DataTable'[Year])
And for each "filter table" the corresponding measure to know the selected value:
SelectedYear-Base = SELECTEDVALUE('FilterTBL-Base'[Year])
and
SelectedYear-CompareTo = SELECTEDVALUE('FilterTBL-CompareTo'[Year])
Now I could calculate the "base total" and the "total to compare to" in my data table:
TotalBase = SUMX(FILTER('DataTable','DataTable'[Year]=[SelectedYear-Base]),'DataTable'[Cost])
and
TotalCompareTo = SUMX(FILTER('DataTable','DataTable'[Year]=[SelectedYear-CompareTo]),'DataTable'[Cost])
So the entire structure looks like this:
The calculation works as expected:
The only problem it bothers me, is that the final table should have the column names based on the slicer selections. In picture above TotalBase should display "FY_2010" and the TotalCompareTo should display "FY_2011".
Is there a way to achieve this? I'm open to any sugestion even if requires R/Python visual.
Kind Regards,
Lucian
Solved! Go to Solution.
Thank you for your time, unfortunately the two matrix will be far away from the requirement as the separate matrix will break the ideea of "comparison" as posted in my previous picture.
If you look to your last posted picture will see that the second matrix will not "align" the values for the same project because are not available (C2 for projects A&C).
The only "closest workaround" was two card visuals with same font/size as the rest of the column titles, but loosing any sort option or "focus mode" for that visual.
Meanwhyle, anyone that will need "dynamic column naming" could vote for this ideea: Improved table visual - dynamic column names
Kind Regards,
Lucian
Hi @Lucian ,
If you want to use table visual, I'm affraid it couldn't be implemented. You could chang TABLE visual to MATRIX visual and drag the "Year" column to Columns field to be shown as column name.
However, there is a little flaw in this way. If you want to drag more than one value to Value field, it will show the value name and the column name at the same time. When you drag one value, it will just show column name.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.
Hello @v-xuding-msft
And thank you for your time. Indeed, matrix could be an option, unfortunately did not cover the report design requirements.
The final report should look like this:
Any other workaround?
Kind Regards,
Lucian
Hi @Lucian ,
I'm afraid there is not a perfect method to show the two column names dynamically in the same visual. You could try to create two matrix to show them separately as a workaround. In this way, they will be changed correctly.
I attached my sample that you can have a try.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.
Thank you for your time, unfortunately the two matrix will be far away from the requirement as the separate matrix will break the ideea of "comparison" as posted in my previous picture.
If you look to your last posted picture will see that the second matrix will not "align" the values for the same project because are not available (C2 for projects A&C).
The only "closest workaround" was two card visuals with same font/size as the rest of the column titles, but loosing any sort option or "focus mode" for that visual.
Meanwhyle, anyone that will need "dynamic column naming" could vote for this ideea: Improved table visual - dynamic column names
Kind Regards,
Lucian
Hi @Lucian ,
It's regrettable that your requirement can't be implemented. I voted up the idea. You could accept your answer as a solution. Then others who need the requirement will find your answer quickly and vote up it as well.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.
Hello @v-xuding-msft
Thank you again for your time and sugestions, and also for your vote. Maybe will raise enough votes for implementation.
Kind Regards,
Lucian
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 |
---|---|
114 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |