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.
This is driving me nuts. I have never encountered this before.
I have a table (Excel Based called 'Metric Ranges' That contains a series of Metrics and their scoring range values (Lower Limit and Upper Limit).
I need to create a measure that will pass in the the MetricId, and MetricValue into this table and return the score based on the ranges for the metric. The formula below works fine in a table column and returns the Score, but for some reason as a Measure, it will not return the value. When I test and return all the VAR's I get values returned, so I know it's not the values there, it is the actual Calculation and that is not working. The Score returned is a blank value. Any ideas why this will not work?
Forumla is:
Net Savings Year to date =
VAR MetricValue = [Savings % Annualize Goal]
VAR MetricPrgm = "4003"
VAR MetricId = 1
VAR Score =
CALCULATE
(
VALUES('Metric Ranges'[Score]), FILTER ('Metric Ranges', 'Metric Ranges'[MetricId] = MetricId && 'Metric Ranges'[Program] = MetricPrgm && MetricValue > 'Metric Ranges'[Lower Range] && MetricValue <= 'Metric Ranges'[Upper Range] )
)
Solved! Go to Solution.
@Anonymous I assume the "metric range" table is not having a relationship with any table? Correct?
Try changing Metric Range to ALL ( Metric Range) in the filter.
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 that seems to be the problem, as I mentioned use ALL and test it and then we can take it from there.
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 good to know. Enjoy!!
Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
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 that seems to be the problem, as I mentioned use ALL and test it and then we can take it from there.
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 I assume the "metric range" table is not having a relationship with any table? Correct?
Try changing Metric Range to ALL ( Metric Range) in the filter.
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.
That's the ticket! It worked.
It has a relationship with the Calendar Table - Effective Data : Date
@Anonymous can you share pbix file with the sample data? I'm assuming you checked the following var returning the value that falls between the range.
VAR MetricValue = [Savings % Annualize Goal]
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.
Because of company privacy I cannot share the .pbix file. But, I can confirm that the measure returns a value. In fact all the VAR's return values. The Calculate is just not working in the measure, but it works when used in a Table Column.
[Savings % Annualize Goal] does have a value. If I switch the the 'Return' to [Savings % Annualize Goal] the value is returned.
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 |
---|---|
106 | |
105 | |
79 | |
68 | |
61 |
User | Count |
---|---|
143 | |
104 | |
103 | |
82 | |
70 |