The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Team,
I have a Measure created which works perfectly without any error. But when i copy this measure formuale and paste it in a new meausre it gives me error.
Originial measure :
Anyone knows how to fix this.
When original measure is working fine what is going wrong with duplicate of that?
Solved! Go to Solution.
You cannot just refer to a column in measure, every time you call out a column value in measure, you have add an aggregation function in front (max, min or sum).
Measure 6 = IF(MAX('REP 105 Labor & HC (1)'[Labor & HC])="HC Budget", IF(MAX('REP 105 Labor & HC (1)'[3rd month flag])=1, IF(MAX('REP 105 Labor & HC (1)'[Current Year HC flag])=1,MAX('REP 105 Labor & HC (1)'[Budget]))))
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
I've just found the same thing. But then realised that i wasn't copying a measure - I was copying the dax for a calculated column - which is a different kettle of fish. Was that the issue maybe?
You cannot just refer to a column in measure, every time you call out a column value in measure, you have add an aggregation function in front (max, min or sum).
Measure 6 = IF(MAX('REP 105 Labor & HC (1)'[Labor & HC])="HC Budget", IF(MAX('REP 105 Labor & HC (1)'[3rd month flag])=1, IF(MAX('REP 105 Labor & HC (1)'[Current Year HC flag])=1,MAX('REP 105 Labor & HC (1)'[Budget]))))
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Hi,
Does this work?
Measure 6 = IF(MAX('REP 105 Labor & HC (1)'[Labor & HC])="HC Budget", IF(MAX('REP 105 Labor & HC (1)'[3rd month flag])=1, IF(MAX('REP 105 Labor & HC (1)'[Current Year HC flag])=1,'REP 105 Labor & HC (1)'[Budget])))
@Ashish_Mathur - It still gives the error.
The problem is this expression works perfectly fine in another measure. I dont understand what is going wrong when i copy and paste it in another measure. Is it a bug in powerBI.?
Hi,
Share the download link of the PBI file and show the problem very clearly.
Do you still get an error with this version?
Measure 6 = IF('REP 105 Labor & HC (1)'[Labor & HC]="HC Budget" && 'REP 105 Labor & HC (1)'[3rd month flag]=1 && 'REP 105 Labor & HC (1)'[Current Year HC flag]=1,'REP 105 Labor & HC (1)'[Budget])
Also note that you are missing the "or else" decision statement.
Hi @lbendlin ,
I changed the expression as below and it worked.
Which version of Power BI Desktop are you using? Latest is 2.96.901.0
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
82 | |
73 | |
46 | |
39 |
User | Count |
---|---|
135 | |
109 | |
69 | |
64 | |
55 |