Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi, i have this measure that display a right value in a card.
But if i try to insert this measure in a table, it doesn't show values
How i should edit the maesure to show values in table? thank you
Solved! Go to Solution.
Hey,
the answer depends on a data that you have and measures that you use in a variables, without seeing these things it is hard to answer what to change.
Context of a card visual and table differs - in a card visual Power BI evaluates the measure in a single, overall context (e.g., all data for the selected filters), this typically means that the variables _1, _2, and _3 are calculated as aggregated values, leading to a single result that can be correctly divided and displayed; and in a table visual, the measure is calculated for each row in the table, with a different context for each row.
You probably get 0 for _2 variable if division returns infinity, so try checking all of the variable parts. I would create separate measure for _2 variable just to check what it returns, if it really returns 0 then break the measure into parts -> create measures to make sure which part of a measure returns wrong answer (COUNTX or FILTER -> maybe some of these in a table cannot be calculated by your row context because it does not have values).
Hi, @userpien
Thanks for moncx reply. Without data, it's hard to determine what's happening. You can provide a complete pbix file without sensitive data for testing and a screenshot of what you want to achieve. This will help you to solve the problem faster.
Best Regards,
Yang
Community Support Team
Hey,
the answer depends on a data that you have and measures that you use in a variables, without seeing these things it is hard to answer what to change.
Context of a card visual and table differs - in a card visual Power BI evaluates the measure in a single, overall context (e.g., all data for the selected filters), this typically means that the variables _1, _2, and _3 are calculated as aggregated values, leading to a single result that can be correctly divided and displayed; and in a table visual, the measure is calculated for each row in the table, with a different context for each row.
You probably get 0 for _2 variable if division returns infinity, so try checking all of the variable parts. I would create separate measure for _2 variable just to check what it returns, if it really returns 0 then break the measure into parts -> create measures to make sure which part of a measure returns wrong answer (COUNTX or FILTER -> maybe some of these in a table cannot be calculated by your row context because it does not have values).
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
106 | |
46 | |
22 | |
22 | |
21 |