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.
Hi,
I'm struggling with something i think should be possible.
I have a table with a column representing the available measure names in my tabular cube model.
I have created a slicer based on this column. The next i would like is a matrix or chart presenting the measure selected in that slicer. Now i know of the solution to create a column with a switch but then i have to write down every single available measure.
What i want is to use the measure name from the table to present the selected measure so that when there are new measures defined within my model they are automaticaly available in the slicer en presentable in the matrix or chart.
Thanks in advance
Hi @Marbo ,
You cannot get the created measure on your Power BI report in a automated way because the DAX engine does not have functions to get the dataschema.
If you refer to the blog post below you can check how you can get the measures information however this will not be dinamic so everytime you create a new measure you need to update this information.
https://exceleratorbi.com.au/getting-started-dax-studio/
To my knowledge don't think that the dinamic feature you want is available. Sorry for making this question but is your model going to change so many times and are you adding so many measures that you cannot track them down and change the switch measure as you need?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix
Thanks for the reply.
During development yes the model can change a lot. Sure you got i point of the amount changes further in the future.
But the main goal i always try to reach is that i create an environment for my customers where they don't need my anymore for complexe dax formulas and just do there desired analysis.
I have exactly that measure information and have a stored procedures within my SQL database to retrieve the latest model when ever i want. like hourly daily or weekly.
Do you think i could use the underlying measure expressions from that metadata to functionally get what i want?
regards
Marbo
Hi @Marbo ,
If you are getting that information from the schemma maybve it's possile using the calculation groups that use the selectedmeasure to make the calculation.
Check the blog post below, probably you need to adjust the values from your dataschemma to pick the selected measures:
https://www.sqlbi.com/articles/introducing-calculation-groups/
https://www.youtube.com/watch?v=DqwcVF09rtA
https://www.sqlbi.com/calculation-groups/
As refered maybe somethings can be adapted from this to get the expected result.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@Marbo - So are you saying that you have Measure1, Measure2, Measure3 and you have those in a column in a table and you want a measure that would be like:
Measure = MAX('MeasureTable'[MeasureName])
And it would return the calculation for which ever measure was selected?
If that is what you want then no. You cannot use EVALUATE in Desktop to the best of my knowledge.
You need to do the SWITCH thing with the disconnected table trick.
@Marbo ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
See if this video can help
https://www.youtube.com/watch?v=vlnx7QUVYME
Appreciate your Kudos.
Hi @amitchandak
Thanks for your reply, I will try to explain myself a bit better.
In power BI desktop i have a connection to a tabular cube. There is a table met metadata about my cube model. Like my available measures. In power bi i added a measure column to that table with the follwing DAX statement