Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I was wondering if it is possible to store all my DAX measures in a field in a table.
I'm thinking about creating a kind of knowledge base whre I can store all the measures my company could use. In this table I would have a text field contaning the measure itself, plus others fields for example to explain what the measure does, what are the tables necessary to excute them and may others informations.
I know I can store the measure as a string, but how would I convert that string into a valid DAX command in Power BI?
Is this possible?
Thank you.
Solved! Go to Solution.
@Anonymous yes it is absolutely possible. If you are publishing the model in a workspace, you can write DMV queries that would return all your measures in a table
select * from $SYSTEM.TMSCHEMA_MEASURES
@Anonymous yes it is absolutely possible. If you are publishing the model in a workspace, you can write DMV queries that would return all your measures in a table
select * from $SYSTEM.TMSCHEMA_MEASURES
@Anonymous , Not very clear.But seem like you need the list of measure DAX studio can help
https://community.powerbi.com/t5/Desktop/Find-the-unused-Measure-Data/td-p/1771801
In case you want to create a power bi table to organize your measure, then refer
https://www.youtube.com/watch?v=b9oDIL8nbu0
Hi,
I was thinking like this:
I have a table called MEASURE_TABLE. In it I would have a varchar field where I would store a measure:
idMEASURE dscMEASURE_NAME dscMEASURE_COMMAND
-----------------------------------------------------------------------------------------------------------
1 DB Date Difference DATEDIFF(MIN(Calendario[Date]), MAX(Calendario[Date]),DAY) + 1
Would it be possible to convert the last 2 fields to a valid measure in Power BI?
It's kind of what you can do in T-SQL when you create a command based on a string and execute it.
Thanks.
@Anonymous , I doubt that. Power Bi cmdlets is there for automation, but I doubt they do not have add measure
you can check
https://docs.microsoft.com/en-us/powershell/power-bi/overview?view=powerbi-ps
User | Count |
---|---|
25 | |
11 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
13 | |
11 | |
9 | |
6 |