Forum Discussion

ARPower_Beast's avatar
ARPower_Beast
Frequent Visitor
1 year ago
Solved

Calculated Tables and Filed Parameters

Can a calculated table access a field parameter table, specifically the “Parameter Order” column?  I am try to use SELECTEDVALUE(Parameter[Parameter Order]) to filter on the current parameter that is...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi ARPower_Beast 

    If you want to use the dynamic table, the better way is that you use the measure to create the virtual table, the calculation table is static. It can only return the corresponding results based on the values ​​selected by your current slicer. No matter how your slicer changes later, the calculation table will not change.

    You can try to use the measure.

    DynamicTable =
    var MetricSelected = SELECTEDVALUE( ParMETRICS[METRICS Order],4 ) 
    var VirtualTable1 =
                    CALCULATETABLE(
                                    SELECTCOLUMNS(table1,field1,field2),
                                    filter1)
    var VirtualTable2 =
                    CALCULATETABLE(
    
                                    SELECTCOLUMNS(table1,field1,field2),
                                    Filter2)   
    
    Var CombinedTable =
                    UNION(
                                    SELECTCOLUMNS(VirtualTable1, field1,field2,
                                    “Condition”,0     
    
                         ),
                                    SELECTCOLUMNS(VirtualTable2 ,field1,field2,
                                    “Condition”,1         
                                  )
                        )
    RETURN
    Countrows(FILTER(CombinedTable,[Condition] = MetricSelected))

    You can refer to the following similar thread.

    Solved: Dynamic calculatable table - Microsoft Fabric Community

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.