Forum Discussion

alkinio's avatar
alkinio
Regular Visitor
8 years ago
Solved

How to create master conversion button or slicer per page for sq.m to sq.ft

Hello everyone

Relatively new to BI and was looking for some help.

Is there a way to create a slicer or a button or anything else that can switch values on the fly on multiple visualisations between sq.m and sq.ft. Bookmarks is and obvious solution but i m looking for a different approach as it means duplicating way too many visualisations. 

Any help or input would be greatly appreciated.

  • Hi alkinio,

     

    I believe that what you need is to create a measure or several that respond to a slicer and give you the expected outcome in sq.m or sq.f

     

    Without knowledge of your data model you need to create something like this:

     

    Created a table only with values that are going to be converted let's assume this is only in units

    Values_To_convert

    Cat         Value

    A100
    B60
    C30
    D20
    E80

     

    Conversion_Table

    Type       Conversionfactor

    Sq.m2
    Sq.f3

     

    Conversion factor only for example purposes.

     

    Then create a measure that looks somehting like this:

    Convert =
    SWITCH (
        MAX ( Conversion_Table[Type] );
        "Sq.m"; SUM ( Values_To_convert[Value] ) * MAX ( Conversion_Table[Conversionfactor] );
        "Sq.f"; SUM ( Values_To_convert[Value] ) * MAX ( Conversion_Table[Conversionfactor] )
    )

    Then just add this measure to your charts and conversion will take place:

     

     

    Again not knowing your model I can't give your further help but hopefully this will guide in the right direction.

     

    Attach PBIX file.

     

    Regards,

    MFelix

2 Replies

  • Hi alkinio,

     

    I believe that what you need is to create a measure or several that respond to a slicer and give you the expected outcome in sq.m or sq.f

     

    Without knowledge of your data model you need to create something like this:

     

    Created a table only with values that are going to be converted let's assume this is only in units

    Values_To_convert

    Cat         Value

    A100
    B60
    C30
    D20
    E80

     

    Conversion_Table

    Type       Conversionfactor

    Sq.m2
    Sq.f3

     

    Conversion factor only for example purposes.

     

    Then create a measure that looks somehting like this:

    Convert =
    SWITCH (
        MAX ( Conversion_Table[Type] );
        "Sq.m"; SUM ( Values_To_convert[Value] ) * MAX ( Conversion_Table[Conversionfactor] );
        "Sq.f"; SUM ( Values_To_convert[Value] ) * MAX ( Conversion_Table[Conversionfactor] )
    )

    Then just add this measure to your charts and conversion will take place:

     

     

    Again not knowing your model I can't give your further help but hopefully this will guide in the right direction.

     

    Attach PBIX file.

     

    Regards,

    MFelix

    • alkinio's avatar
      alkinio
      Regular Visitor

      Thank you so much for the help.

      Its really useful and close to what i was looking for.

      Regards