0
votes

I would wish to understand how we can replicate a Measure Name and Measure Value pill while replicating a report from Tableau to Power BI. Methods Looked for : I have gone through blogs and could not find something relevant. I found out this: Community Blog but this will slice my data into different visual.

My Current Tableau output is like: Tableau Output

My Current PowerBI Output is like: PowerBI Output

Kindly note that I am bit new to PowerBI, though i am thorough with DAX so any ideas to do this via DAX would be a great win to dive more into PowerBI at a good level.

A quick note: The above data is filtered according to Year and contains values from 2012 to 2021, so in case if the filters are removed then is it possible that all the years for "NET_SALES" appear together (2017 then 2018 just below it and so on)? and similarly for "NET_UNITS" as well?

Also, I am not too sure if this question violates the community guidelines, but if anyone can help me in improving the quality of question then I will be more happy to do so. A comment would be great in that case. :)

1

1 Answers

1
votes

You can achieve a similar result by using a calculation group: enter image description here

In this matrix (I took it from my model), Cumulative Current FY and Current FY are 2 separate formulas in the calculation group (I called the column Formula), then in the matrix I put that column as the first item:

enter image description here

In the calculation group you can have two items, one that returns the NET_SALES calculation and one that returns the NET_UNITS.

Learn more about calculation groups here

https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

Edit: If you don't want to use Calculation Groups, you can create a table Measure Name and add 2 records to it: NET_SALES, NET_UNITS.

Then create a measure:

Measure Value = 
SWITCH(SELECTEDVALUE('Measure Name'[Measure]), 
       "NET_SALES", [NET_SALES], 
       "NET_UNITS", [NET_UNITS], 
       "no measure selected")