Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I want to create a table
I am trying to display a table of the tags selected in another table, but if none are selected I want to show an empty table, whereas the default behaviour is to display all of them.
Why doesn't this Table formula work?
Hi @KervBruce
You cannot use a Measure to create a Calculated table since the context is not recognized.
What do you want to achieve with this table?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks, I thought that was propably the case. See my reply to Greg on what I am trying to achieve.
Hi @KervBruce ,
Believe you have a great expert on the case so I will leave it to him. 😄
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@KervBruce Couple things. First, I believe you need this:
VAR N = COUNTROWS('Tags')
Unless [Tags Selected] is a measure that returns the number of tags selected.
Also, mixing measures with calculated tables and columns doesn't generally work as calculated tables and measures are not dynamic.
Finally, yes, DAX doesn't like it when you try to return different tables such as your IF statement. You could just return BLANK() instead of BlankTable and that will likely fix that issue.
But, overall, you will likely need to rethink your approach to this. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Thanks @Greg_Deckler
Here is my model:
Yes I do have a measure called [Tags Selected] as follows:
@KervBruce Well, I created an AND slicer once. You might be able to use it along with a Complex Selector. Really difficult without sample data to test with.
Patient Cohort (AND Slicer) - Microsoft Fabric Community
The Complex Selector - Microsoft Fabric Community
User | Count |
---|---|
94 | |
86 | |
78 | |
68 | |
63 |
User | Count |
---|---|
113 | |
99 | |
97 | |
64 | |
59 |