Forum Discussion

topkapi's avatar
topkapi
Frequent Visitor
8 years ago
Solved

Able to Show Records/Drillthrough when using dynamic dimensions (slicer)

Hi All,

 

I am using switch function to dynamically change chart axis in Power BI. I created a table like this e.g

Table =
var branch = CROSSJOIN(ROW("Type","Branch"), VALUES(DIM_BR[Bname]))
var age = CROSSJOIN(ROW("Type","age"), VALUES(DIM_MER[age]))
return UNION(branch,mid

and switch function to create a measure.

 

Measure2 = if(HASONEVALUE('Table'[Type]),
            SWITCH(VALUES('Table'[Type])
                ,"br",CALCULATE(count(DIM_mid[mid])
                                    ,TREATAS(VALUES('Table'[Values])
                                            ,DIM_BR[Bname]))
                  ,"age",CALCULATE(count(DIM_mid[mid])
                                    ,TREATAS(VALUES('Table'[Values])
                                            ,DIM_MER[age]))))
       It works find. I use measure to create chart and can filter dynamically by age or br.

But this way i am unable to use feature "show records" with details in the tables i used like dim_mid since it shows me only summary values in "showdata" only in the measure. I want to see detail data in dim_mid table by right clicking on the chart and using "Show Records"  whenever I select a br or age. Is there any help?  thanks

1 Reply