The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a matrix that has 3 measures in it. I am using the 'Show Values in row groups rather than columns' feature. When the slicers are selected, I want any of the 3 measures that don't return a value (aka blank), to disappear and fall off of the matrix. However, they currently just stay and show blanks. Is it possible to have them disappear other than using conditional formatting?
Solved! Go to Solution.
Thanks for that @kewaynes / @kewaynes333 🙂
I've come up with some suggestions in the attached PBIX, including an attempt at translation for the measures. The translation requirement does add some complexity to the calculation group approach, but I think it is do-able.
Oh, apologies for any poor translations in this test model. I used Google translate just for demo purposes.
Here's a summary of what I've tried. I won't list all the DAX code here but you can see it in the attached PBIX (using Tabular Editor for calculation groups).
Here are images of some of the key items:
Measure Selection Calculation Group
Measure Selection Calculation Group
Filter Measure Selection Calculation Group
Language (field parameter)
Report Page
This was reasonably complex to set up, but I think it could be workable. There is maintenance required whenever measures or languages are added, but that shouldn't be too painful. You may also need a relationship between UoM and Language which you could add.
Hope that helps to some extent!
Regards
@kewaynes thanks for the extra info.
Using field parameters does slightly complicate things 🙂
The constraint with Power BI visuals is that blank measures cannot be hidden so, whatever method we use, we will have to have values of a column standing in for measures in some way (since they can be hidden).
If you are using field parameters to allow switching/filtering of measures and you want to hide blank measures, I think you will still have to go for either
Using the Calculation Group approach, there would be a bit of setup. The steps I would suggest are:
If you instead used the measure-selection measure, you could have relationships with the parameter table which might make things a bit easier.
That's all I can think of for now, but there could well be other methods.
Did you want me to set up a PBIX to demonstrate this? If you had a small PBIX you could share with non-sensitive data with a similar structure to your real one, that would help.
Regards
Thanks for the open dialouge, Owen. And the willingness to take a look at my model. How do I attach a pbix? It's saying the file type is not supported.
Sharing from my personal account. The one thin I haven't built in yet is the language translation, if that makes a difference for your solution.
Hide Measures Sample Data (1).pbix
Th
Thanks for that @kewaynes / @kewaynes333 🙂
I've come up with some suggestions in the attached PBIX, including an attempt at translation for the measures. The translation requirement does add some complexity to the calculation group approach, but I think it is do-able.
Oh, apologies for any poor translations in this test model. I used Google translate just for demo purposes.
Here's a summary of what I've tried. I won't list all the DAX code here but you can see it in the attached PBIX (using Tabular Editor for calculation groups).
Here are images of some of the key items:
Measure Selection Calculation Group
Measure Selection Calculation Group
Filter Measure Selection Calculation Group
Language (field parameter)
Report Page
This was reasonably complex to set up, but I think it could be workable. There is maintenance required whenever measures or languages are added, but that shouldn't be too painful. You may also need a relationship between UoM and Language which you could add.
Hope that helps to some extent!
Regards
First of all, I can't believe you wouldn't help me out and get the official Portguese translations, Owen.
Secondly, this is awesome! I really appreciate the time and effort to put this together. I'm going to run this by my team. Overall, I think this would work for us (I mean, it clearly works in the file you sent me), I'm just not sure we would want to go down this route due to the added complexity, given two reasons:
1) We have up to 30 languages we need to support. We'll obviously have to translate everything anyways, but this way may be a little messier, out of necessity.
2) I'm not sure any of the devs on our team have much experience with Tabular Editor. To be honest, I'm pretty novice with it, myself. That said, I was able to adde a language and a measure so I do think I have a fundamental understanding of how this works. I'm sure this is an oversimplification, and possibly even wrong, but I'm thinking fo this approach almost like building a calculation group on top of a field parameter.
Whether we use it or not, this is the exact outcome I was looking for and it will surely aid myself and my team in the future knowing the possibilities we can accomplish when we dive into Tabular Editor.
Thanks again!
Hi @kewaynes
I think a nice way to handle this is to use a calculation group as a measure selector. Alternatively you could create a measure selection measure.
I have attached an example PBIX.
The steps are:
From my PBIX, here is a comparison of the original approach (directly using measures) which retains blank measures, and the calculation group approach which hides blank measures (since values from the calculation group column are performing the role of measures).
Does this work for you?
Regards,
Thanks for this Owen. This seems like it could work. However, I do have a couple more layers of complexity and am wondering if this approach would still work with them.
1) There is a Unit of Measurement slicer in the report. If the user changes the selection from US to Metric, the report needs to not only change the values in the matrix, but also the measure label. (i.e. - change from 'Engine Oil Temp (°F)' to 'Engine Oil Temp (°C)'. I'm currently using Field Parameters to accomplish this.
2) On top of this, the report needs to support several language translations. These two things on top of each other is making things rather complex. Typically, I would use a translation table for this. Or build onto the Field Parameters where every measure is repeated for each language and then use RLS to filter to the specific measure needed (i.e. - is someone in Brazil is viewing it, show the Portuguese named measure label).
Any thoughts on if calc groups could still support this or do these extra layers cause an issue?