Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Hopefully someone can help me with the following code...
I only want to filter and show the data of specific customers in a table. I believe this can be done by using IF Or IF(MATCH). Below you can find the code I have written so far, but I cannot get it to work. What should I adjust?
=if({<[Customer Sold-to Desc]="CustA","CustB">}[Customer Sold-to Desc],null())
It should show a - (null) if another customer is being displayed, and CustA or CustB if those customers generated sales. If I exclude null values, the table should only show the customers preselected in the code. At this point all customers are shown as - (null).
Hopefully someone can help me with this.
Thanks in advance.
Kind regards,
Pepijn
if you are trying to to create calculated dim then try:
=if(Match([Customer Sold-to Desc], 'CustA', 'CustB'), [Customer Sold-to Desc], null())
OR
=Aggr(Only({$<[Customer Sold-to Desc]={'CustA','CustB'}>}[Customer Sold-to Desc]),[Customer Sold-to Desc])
Measure: both should work
=Aggr(sum({$<[Customer Sold-to Desc]={'CustA','CustB'}>}Units),[list of your table dims])
=sum(Aggr(sum({$<[Customer Sold-to Desc]={'CustA','CustB'}>}Units),[list of your table dims]))
Yes, I got it to work. But, can I somehow hide the column Customer Sold-to Desc now? Because I know what the customers shown are.
=if(match([Customer Sold-to Desc],'CustA','CustB'),[Customer Sold-to Desc])
yes. check the condition property in the props and insert 0.
Can you show it with an image? I cannot seem to find it. I can hide the column by type "0" in Show column if, but then the used expression for the column deactivates as well...
@debrouwer you can include set analysis condition in your measure "Not delivered unit" . Assuming your expression of that measure is sum(not_delivered_units). you can include set analysis condition as below
sum({<[Customer Sold-to Desc]={'CustA','CustB'}>}not_delivered_units)
If you have multiple measure, you need to include this set condition in all the measure of that table.
Then, in table properties Add-ons, uncheck "Include zero values" option