Forum Discussion

harib's avatar
harib
Icon for Post Patron rankPost Patron
4 years ago
Solved

How to Pass Slicer selected Value into Calculated column to display the results

  Hi All,   I have create calculated column in Table A like below, however if i filter Date filed from the dimdate table, calculated column values are not changing.    Ex : Calclulate Column = ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi harib ,

     

    Inactive the relationship between tableB and dim date then create a measure as below.

    Measure =
    var tmp = calculatetable(values('tableA'[id]),filter(ALL('tableA'),Table A[ Category] in {1,2,3} && NOT(Table A [Produts])  in {11,12,13}))
    return
    calculate(sum('tableB'[sales]),filter(ALL('tableB'),'tableB'[id] in tmp&&'tableB'[date] = selectedvalue('Dim date'[date])))

     

    Best Regards,

    Jay