Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a line char with 2 dimension - Year-Month & Category.
It possible to add only one measure which include if statement.
let's consider 2 simple scenarios to display average amount per order:
* If user selection include several months (count(distinct Year-Month) <> 1) then display the measure for the selected range.
* If user selection include only one month (count(distinct Year-Month) = 1), then display the same measure for a specific date range based on this month.
So, the full measure is:
If(Count(distinct Year-Month) <> 1,
Sum(Amount) / Count(distinct OrderID),
{<Date={">=$(vMinDate)<=$(vMaxDate)"}, Year=, Month=>} Sum(Amount) / Count(distinct OrderID)
)
Every part work good separately, but doesn't work with the condition.
For example, on the x-axis, I need to see only the relevant months.
Thanks,
Amit.
*Edit*
When Count(distinct Year-Month) = 1, I see only the selected month data and not a range of months (set in the variables).
@Amit_B
And unchecking the checkbox in Data Handling of zero values?
- Matheus
Yes, I tried it.