Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
johnnyjohn
Creator II
Creator II

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