I’m trying to show value for Sales Where there’s no row for a date as zero.
Question
-
Why below non commented expression (Code1) is not showing values for missing rows in Sales Table.
-
In case i need not to use variable or doing IF on predefined measure (Code2), what is the alternate code to resolve same.
Code1
Total Sales If No Blank =
/*
VAR TotalSales = SUMX(Sales_Data,Sales_Data[Total Revenue])RETURN
IF(ISBLANK(TotalSales),0,TotalSales)
*/
SUMX(Sales_Data,IF(ISBLANK(Sales_Data[Total Revenue])=TRUE(),0,Sales_Data[Total Revenue]))
Code2
If Sales Is Blank = IF(ISBLANK([Total Sales]),0,[Total Sales]) // Where [Total Sales] is predefined measure with expression SUM(Sales_Data[Total Revenue])
I’m confused because i came to below points for iterator w.r.t to below expression
SUMX(Sales_Data,IF(Sales_Data[Channel]=“Export”,Sales_Data[Total Revenue],0))
- First the Evaluation Context which will be lets say first date in my visual
- Then ,Sales table will filter for that date using active relationship.
- Then, Iterator will work on selected rows from step 2 row by row
Thanks,
Harry