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.
Hi, I got different tables in my reports but in each of them I use a calculated column where I create the variable: VAR Version = 787_501.
I will need to change this sometimes, and I would like to know if there is a way to declare a variable in only ONE table, and use it in the others, and if no, is there any way to make something like that?
Thank you!
Solved! Go to Solution.
Proud to be a PBI Community Champion
@Anonymous It's possible by having a separate table for version and use the "LOOKUPVALUE" funtion in your calculated column logic.
Use the below as your calculated column logic and the value gets updated if you update the version value in the above table.
Version = LOOKUPVALUE(Versioning[Version],Versioning[Sno],1)
Let me know if any issues !
Proud to be a PBI Community Champion
Thanks for the help!
The formula return the correct value but it seem like it does not work with my filter.. To be more precise, only this part of the formula is working, (so where I do not use the variable).
Is there a problem with my way to concatenate ? For example it should write "test 787_501\Development"
When I use: VAR Versions = "787_501" it works , but when I use
Proud to be a PBI Community Champion
I was sure I tried with and without quotes... It look like I was wrong, it works...
Thank you very much to you and @sturlaws !
@Anonymous,
have you tried without the quotes around 787_501?
-s
Hi,
If I understand you correctly, [Var Version] is a constant. Then you can either have it in a table designated for this constant, or you can add it to just one of the table, and create calculated columns in the other tables like this:
VAR Version = min('Other table'[VAR Version]
cheers,
S
You understood perfectly, when I first read your comment , I thought : yes that's it.
BUT it seem like it doesn't works...
I've created a table "Version" with only one cell called " "787_501" ",
I've tried just to use your formula and return it to see if it works as intended:
And it does... But when I use the formula in my other tables like this:
It doesn't works, there is no error but I have a different result from before in my column... I don't understand why.
Thank you for your reply
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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |