Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
johnnyjohn
Creator
Creator

Showing dimension in table conditionally

I want to display  [Commissions.CUSTOMER] if the distinct number of Commissions.INC_COMM_LEDGER is greater than one in the past month (Commissions.TRADE_MONTH_START)

I used this

=IF(COUNT({$<[Commissions.TRADE_MONTH_START]={'$(=Monthstart(Date(today(),'M/D/YYYY')))'}>} Distinct [Commissions.INC_COMM_LEDGER]) > 1,[Commissions.CUSTOMER])

If I put this condition as a measure and show True or False, like shown below, it works, but when filtering out the dimension it says invalid dimension.

=IF(COUNT({$<[Commissions.TRADE_MONTH_START]={'$(=Monthstart(Date(today(),'M/D/YYYY')))'}>} Distinct [Commissions.INC_COMM_LEDGER]) > 1,"True", "False")

How can I do only show the dimension CUSTOMER when this condition is true in my table?

Many thanks

1 Solution

Accepted Solutions
lorenzoconforti
Specialist II
Specialist II

You need to add [Commissions.CUSTOMER] as a normal dimension

then, under "show column if" just write this:

=COUNT({$<[Commissions.TRADE_MONTH_START]={'$(=Monthstart(Date(today(),'M/D/YYYY')))'}>} Distinct [Commissions.INC_COMM_LEDGER]) > 1

View solution in original post

1 Reply
lorenzoconforti
Specialist II
Specialist II

You need to add [Commissions.CUSTOMER] as a normal dimension

then, under "show column if" just write this:

=COUNT({$<[Commissions.TRADE_MONTH_START]={'$(=Monthstart(Date(today(),'M/D/YYYY')))'}>} Distinct [Commissions.INC_COMM_LEDGER]) > 1