Forum Discussion
Vennela
4 years agoFrequent Visitor
Dynamic calculated column based on slicer selection
Hi, I have a situation where the user wants to select a value from the slicer and the Power BI should calculate the columns based on the selected value. Below is a clear explanation of the iss...
- Anonymous4 years ago
Hi Vennela ,
I'm afraid that creating calculated columns doesn't do what you want (dynamically displaying values based on slicer selection). As amitchandak said, creating a calculated column can't get the values selected by the slicer. You can check the following blogs for the answer...
Calculated Columns and Measures in DAX
Calculated Columns vs Measures
There is a big difference between calculated columns and measures. The value of a calculated column is computed during data refresh and uses the current row as a context; it does not depend on user interaction in the report. A measure operates on aggregations of data defined by the current context, which depends on the filter applied in the report – such as slicer, rows, and columns selection in a pivot table, or axes and filters applied to a chart.
Best Regards
amitchandak
4 years agoSuper User
Vennela , You need to create measure as column do not take slicer value
Try like
Applicable =
sumx(Table, calculate( IF(SUM('Table B'[Network])>0,IF([Rate]>=SELECTEDVALUE('Threshold'[Threshold]),1,0),0) ))
or
sumx(values(Table[ID]), calculate( IF(SUM('Table B'[Network])>0,IF([Rate]>=SELECTEDVALUE('Threshold'[Threshold]),1,0),0) ))