Forum Discussion

Kavya123's avatar
Kavya123
Icon for Helper III rankHelper III
5 years ago
Solved

Qlikview expression in DAX

Hi Everyone,

 

I am moving Qlikview reports to Power BI . Below is the expression used in Qlkiview

 

num(sum({<iIdConsortium1={52}>} Pick(No,p10_val1 ,p25_val1,median_val1,p75_val1,p90_val1))/if(ResponseType1 like '*%', 100, 1), ResponseType1).

 

I have to choose the Benchmark filter. If I select 25th then sum(p25_val1 ) should be displayed in my chart. Please help me to achieve this.

 

No, Name
1,10th
2,25th
3,50th
4,75th
5,90th

 

  • Hi Kavya123 ,

     

    1. Create several measures and create a disconnected table to use as slicer.

    You can refer to this blog:

    https://www.fourmoo.com/2017/11/21/power-bi-using-a-slicer-to-show-different-measures/ 

     

    2. Use the Tabular Editor to dynamically switch the measure.

    Under external tools, select Tabular Editor. If you don't see these menu options in power bi desktop, you need to install the Tabular Editor first.

     

    Right click the table, select create new, and then click calculation group.

    In calculation group, create a new calculated item. Right click calculation items and create a new one.

    Use the DAX formula that created measure before to create calculation item and set the string format.

    We use this measure to dynamically select calculation items based on slicer.

     

    Sample .pbix

     

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

2 Replies

  • create a measure that is filtered on SELECTEDVALUE() of your Benchmarks slicer, or use Calculation Groups.

     

    Warning: Do not attempt to translate QlikView formulas into DAX formulas. Re-implement the concept, not the implementation.

  • V-lianl-msft's avatar
    V-lianl-msft
    Icon for Community Support rankCommunity Support

    Hi Kavya123 ,

     

    1. Create several measures and create a disconnected table to use as slicer.

    You can refer to this blog:

    https://www.fourmoo.com/2017/11/21/power-bi-using-a-slicer-to-show-different-measures/ 

     

    2. Use the Tabular Editor to dynamically switch the measure.

    Under external tools, select Tabular Editor. If you don't see these menu options in power bi desktop, you need to install the Tabular Editor first.

     

    Right click the table, select create new, and then click calculation group.

    In calculation group, create a new calculated item. Right click calculation items and create a new one.

    Use the DAX formula that created measure before to create calculation item and set the string format.

    We use this measure to dynamically select calculation items based on slicer.

     

    Sample .pbix

     

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