Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everybody,
I am struggling with formats of expressions in Qlik.
I have a column 'total in' which gives me the number of all entries in busses for 5 month.
My KPI gives me the correct sum. Then I put filter of total in and select 0 in order to get the number of times when nobody
was in the bus. In order to show the difference, I wanted to use alternate state and create a measure where the Total in is 0
in order to have the same result as using the filter. Unfortunately, all syntax are 'garbage'.
In general, all numbers / dates which can be selected in filters could be incorporated as dimension / measure, but I dont
know how to write those expressions....
In my Total in = 0 as a measure, does anybody have an idea how this could be done easily?
Thanks a lot,
I doubt, But this will give a clue?
If(GetSelectedCount(Filed)>0, Sum(TotalIn), Sum({AlternateState<Field=>}0)*1)
Hi Anil,
Thanks for taking the time to solve my issue, as I said before I am not a specialist with expressions, maybe I can help someone else with an easier alternative.
Once you filtered on the total in an chose 0, you go back to creating measure and select your alternate state, chose the table + total in and you can simply click on 'set expression' and the measure I wanted magically appears.
This is also very helpful with dates, etc.
Greetings from Luxembourg
Since it worked for me, hopefully someone else gets the 'aha' moment as well.