Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have the following measure which works perfrectly when rows are reutned from both tables but when one table returns no rows there is no response not even "Blank".
I would like to in the event that one of the tables returns no rows display "0".
Dax meaure
Test = Calculate(
Countrows(tablea),
Filter(relatedtable(tableb), and ([Status] = "In Stock", [substatus] = "Available")), tablea[object_type] = 12)
Tableb is not returning any rows as there is no match for [Status] = "In Stock", [substatus] = "Available"
Thanks
Solved! Go to Solution.
VAR FilteredTableB = FILTER( RELATEDTABLE(tableb), [Status] = "In Stock" && [substatus] = "Available" ) RETURN IF( COUNTROWS(FilteredTableB) > 0, CALCULATE( COUNTROWS(tablea), FilteredTableB, tablea[object_type] = 12 ), 0 )
VAR FilteredTableB = FILTER( RELATEDTABLE(tableb), [Status] = "In Stock" && [substatus] = "Available" ) RETURN IF( COUNTROWS(FilteredTableB) > 0, CALCULATE( COUNTROWS(tablea), FilteredTableB, tablea[object_type] = 12 ), 0 )
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |