Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
Expand all | Collapse all

how to create histograms on a measure.

  • 1.  how to create histograms on a measure.

    Posted Jul 03, 2019 07:23 AM
    HI  I am new to this group as well as Power BI.  I need help  on below scenario

    I have 2 measures on Orders table. I.e   Transfer Price= (TP)  &  Max% of TP  = MP(TP) . I need to create histogram chart based on MP(TP) measure. These values will change based on currency selection. Here is a sample data.As shown in the image this was achieved by creating calculated column when US currency was selected. Now If I select other currency like Pound this graph should change. Any suggestion on DAX formula. thanks in advance.


    MP (TP) range = SWITCH(
    TRUE(),
    [MP (TP)]>1,"1.00=>",
    [MP (TP)]<=1.00 && [MP (TP)]>0.95,"0.95 - 1.00",
    ......
    [MP (TP)]<=0.95 && [MP (TP)]>0.90,"0.90 - 0.95",
    [MP (TP)]<=0.10 ,"< 0.10",
    "NOT DEFINED")




    when China currency yuan selected.

    Order no MP (TP) TP Ord. qty
    328200710 5 8529243 50
    15493420 3 5007904 58
    WW1108264 5 4752192 36
    4210176 3 4619236 42
    WW0039022 4 3383613 18
    WW1106078 3 3237819 56
    4542232 3 3088466 136


    ------------------------------
    Varshi Reddy
    Analyst
    +91 9538995000
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: how to create histograms on a measure.

    Top Contributor
    Posted Jul 03, 2019 09:27 AM

    Hi @Varshi Reddy:

    Great question!
    Two parts:
    1) This is a segmentation implementation - reference more here (SQLBI - Dynamic Segmentation) and here (SQLBI - Static Segmentation)​
    2) Part two of your question is how to dynamically shift the segmentation based on the currency selected.
    This means that you are going to be using the Dynamic Segmentation pattern, and you are going to be filtering your fact table by your selected dim table.
    This is very simply over simplified - but if you upload some mock data, we can build a quick solution for you.

    Best,
    William



    ------------------------------
    William Rodriguez
    Business Analyst | MCSA: BI Reporting
    ------------------------------

    Academy - Online Interactive Learning from Experts