Forum Discussion

yve214's avatar
yve214
Icon for Helper III rankHelper III
4 years ago
Solved

How to get fixed values without aggregating

Assuming I modeled my fact table to my date table through the date and fact_table date column, how can I calculate say the qty for just that specific date (week end date Sunday only) without aggregat...
  • amitchandak's avatar
    4 years ago

    yve214 , You can create a flag for that and use that in filter

    new column

    Weekend = if(Weekday([Date],2) =7,1,0)

     

    new measure =

    calculate(sum(Table[Qty]), filter(Table, Table[Weekend ] =1))

     

    or , without new column

     

    calculate(sum(Table[Qty]), filter(Table, Weekday([Date],2) =7))