Forum Discussion
Dynamic Measure and Slicer
- 5 years ago
Nimai123 , for that you can add isfiltered or hasonevalue
Volume KL Dynamic19-20 =
var _cnt = countx(filter(allselected('Calendar'[FY],'Calendar'[FY] ="19-20"),'Calendar'[FY])+0
return
IF(_cnt >0 && isfiltered ('Calendar'[FY]) ,CALCULATE( SUMX(GRINetSalesDetailsBI,GRINetSalesDetailsBI[NetSales]/1000) ,'Calendar'[FY] = "19-20" ),BLANK())
Nimai123 , I am assuming you are hiding showing like based on selection. And each measure is a line
Volume KL Dynamic19-20 =
var _cnt = countx(filter(allselected('Calendar'[FY],'Calendar'[FY] ="19-20"),'Calendar'[FY])+0
return
IF(_cnt >0 ,CALCULATE( SUMX(GRINetSalesDetailsBI,GRINetSalesDetailsBI[NetSales]/1000) ,'Calendar'[FY] = "19-20" ),BLANK())
Volume KL Dynamic 20-21=
var _cnt = countx(filter(allselected('Calendar'[FY],'Calendar'[FY] ="20-21"),'Calendar'[FY])+0
return
IF(_cnt >0 ,CALCULATE( SUMX(GRINetSalesDetailsBI,GRINetSalesDetailsBI[NetSales]/1000) ,'Calendar'[FY] = "20-21" ),BLANK())
- Nimai1235 years agoPost Patron
Hello amitchandak
Yes, I am hiding and showing based on the selection in the slicer and each line is a measure.
When I am not selecting any year from the slicer I should get a blank result, but I am getting both the lines by using the above measures
When I select 1 year I should get one line and when 2 I should get 2 lines and so on...
- amitchandak5 years agoSuper User
Nimai123 , for that you can add isfiltered or hasonevalue
Volume KL Dynamic19-20 =
var _cnt = countx(filter(allselected('Calendar'[FY],'Calendar'[FY] ="19-20"),'Calendar'[FY])+0
return
IF(_cnt >0 && isfiltered ('Calendar'[FY]) ,CALCULATE( SUMX(GRINetSalesDetailsBI,GRINetSalesDetailsBI[NetSales]/1000) ,'Calendar'[FY] = "19-20" ),BLANK())