Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My Customer table is like:
Sales Category table is like:
I'm trying to create a pivot table and a Category filter. I want to implement:
1. By default, it's showing YES if a customer sales either apple or banana, NO if a customer sales neither.
2. If select APPLE, show YES for customers who sales apple, NO for customers don't.
I'm creating the model by Sales Category left join Customer. My function is:
IF(COUNT(Category)>0,'YES','NO')
It works well without filters. But if I selected only Apple, it would only show C2 &C3 with 'YES'.
How should I modify my model or function?
Thanks in advance!!!
Or this
If(Len(Trim(If(Count(Category) > 0,'YES','NO'))) = 0, Only({1} 'NO'), If(Count(Category) > 0,'YES','NO'))
You can try
IF(COUNT( {1} Category)>0,'YES','NO')
Or this
If(Len(Trim(If(Count(Category) > 0,'YES','NO'))) = 0, Only({1} 'NO'), If(Count(Category) > 0,'YES','NO'))