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 am trying to use variable function for the first time and it does not recognize the table and/or the field. Does it work, even if the table are not linked.
Here's a copy of the pbix
Regards
https://1drv.ms/u/s!At4hIgQFrUxYjVIYRSj6hBaaqoDV?e=NlbuEO
Solved! Go to Solution.
Hi @Anonymous ,
Does that make sense? If so, please mark the helpful answer as the solution. More people will benefit from here. If you still have questions, please feel free to ask us.
Hi @Anonymous ,
In your pbix file, I can see that you are creating a dax calculation:
You measure as follows:
The other thing is in the above measure in one table, you are using column from someother table.
You can only do this when these 2 tables are related to eachother.
Thanks,
Pragati
@Anonymous, first of all, you are adding a measure and in a measure, you have to use some sort of aggregation to use the column name which you are not doing in your measure.
Now to your original question, what you are trying to achieve? You need to provide a bit more context about your question and what you are trying to achieve. Not necessarily VARiables are always required, it depends on what you are trying to achieve. Putting a question without context is very hard to answer.
Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous , what is variable function ?
I mean using a measure such as:
Hi @Anonymous ,
Not clear about what you want. You could try this firstly:
Distribution =
VAR Distribution =
SWITCH (
TRUE (),
MAX ( 'Project info'[NBL] ) <> BLANK ()
&& SUM ( 'Project info'[BudgetRevenue] ) <> BLANK (), "Flat",
"none"
)
RETURN
Distribution
There are a few points about your formula:
Distribution =
VAR
Distribution=Switch(true(),
'Project info'[NBL] && 'Project info'[BudgetRevenu],"Flat","none")
RETURN distribution
Distribution =
VAR
Distribution=Switch(true(),
'Project info'[NBL] && 'Project info'[BudgetRevenu],"Flat","none")
RETURN distribution
Distribution =
VAR
Distribution=Switch(true(),
'Project info'[NBL] && 'Project info'[BudgetRevenu],"Flat","none")
RETURN distribution
You could tabke a look at the documents to learn more.
Create measures for data analysis in Power BI Desktop
Hi @Anonymous ,
Does that make sense? If so, please mark the helpful answer as the solution. More people will benefit from here. If you still have questions, please feel free to ask us.
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |