Forum Discussion
Show Nulls when attribute is selected and show values when selected in combination with other attrib
Hello,
how to show null when attribute is placed as single in table and to show values when placed in combination of other attributes in table.
for example: we have 3 columns in table stating product category, company and brand
so when product category or company is placed in matrix table it should be shown as null, and when placed in combination with brand(drilldown way) it should display values/data.
trying to create DAX using isfiltred function but not helping.
Thanks in advance.
13 Replies
- ValtteriN
Community Champion
Hi,
I am not sure if I understood your issues, but from what I understood you want to show nulls on "1st level" of a matrix and when you drill down you would display values?
Like you suggested this can be achieved with ISFILTERED. Here is a fomula example:Matrix with Blanks on lvl 1 = IF(ISFILTERED('Matrix example'[Lvl 1])&&ISFILTERED('Matrix example'[Lvl 2])=FALSE(),"", //This checks if the current row is level 1 if so -> returns blank else returns the calculation belowSUM('Matrix example'[Value])) //Sum can be replaced with measure
End result:The key here is to use multiple ISFILTERED functions with true and false conditions.
Hopefully this helps to solve your issue and if it does consider accepting this as a solution!- AnonymousNot applicable
this is what i am expecting..
hope i am clear.
- ValtteriN
Community Champion
Okay, I think I got it now. Unfortunately, according to my understanding a single table and level 1 of a matrix operate the same way so it is not possible to have one showing nulls and the other showing values with the same formula. Maybe we should try a different approach? What is reason behind this measure so why do you need it?
- AnonymousNot applicable
values for company, category are not correct at higher level i mean when selected as single attribute in table, but when i drill down with brand then values are correct at that level, so aggregated values are not correct, which should be avioded , and we are using this power bI dataset as source to different dasbaords unlike sql server or azure etc.., so to aviod developers use wrong info we need to hide data at upper level.
- AnonymousNot applicable
type mistake, power BI dataset used as datasource like sql,azure etc..
- ValtteriN
Community Champion
In this case shouldn't a simple,
IF(ISFILTERED('Matrix example'[Brand]),SUM('Matrix example'[Value]),"")
Do the trick?
If the information is correct when filtered via brand then this condition should ensure the validity of data.
Example of how it looks:- AnonymousNot applicable
can you share pbix with me, i tired similar method but its not working for me
- V-lianl-msft
Community Support
Hi Anonymous ,
Is this the result you expect?
Try to create a measure like below:
Measure = IF(ISINSCOPE('Table'[Brand]),SUM('Table'[value]))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- AnonymousNot applicable
Thank you, but this not what i am expecting, measure should not be blank for prod_category/company.
if prod-category/company slected individually then it show blank, in hierarchial struture it should populate the values.
- V-lianl-msft
Community Support
Hi Anonymous ,
Try this measure:
Measure 2 = IF(ISINSCOPE('Table'[product category]),IF(ISINSCOPE('Table'[company ]),SUM('Table'[Value]),BLANK()),BLANK())
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.