Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to count a specific value using a variable:
to count the flight if arrival_date is less that depart date
i used this expression count({<arrival_date < departure_date }> flights)
Count({$< arrival_date = {"<$(=depart date)"}>} Flights)
In many scenarios it would be beneficial to do the essential work within the data-model - with something like:
Date1 - Date2 as DateOffset
class(Date1 - Date2, 3) as DateOffsetCluster,
sign(Date1 - Date2) as DateOffsetDirection
which could be used as dimensions and/or selections and/or conditions.
Hi @abTech,
LOAD *,
If(arrival_date < departure_date, 1, 0) as FlightFlag
FROM [YourDataSource];
And then use this flag in your expression:
count({<FlightFlag={1}>} flights)