Forum Discussion

gssarathkumar's avatar
3 years ago

Get the DAX values into a Table

I have created below 5 DAXs and plotted a Table Visual as below:

 

# of items sold

# of items in stock

Total Sales

Profit

Profit %

 

Date

# of items sold

# of items in stock

Total Sales

Profit

Profit %

02-04-2023

10

100

 ₹     1,000

 ₹ 100

10%

09-04-2023

12

200

 ₹     2,000

 ₹ 200

20%

16-04-2023

14

340

 ₹     3,000

 ₹ 300

20%

23-04-2023

16

400

 ₹     2,000

 ₹ 200

20%

 

I do have an another excel sheet loaded with the data below:

 

KPI Measures

02-Apr

09-Apr

16-Apr

23-Apr

Number of items Sold

 

 

 

 

Number of items in Stock

 

 

 

 

Total Sales per week

 

 

 

 

Profit per week

 

 

 

 

Profit % per week

 

 

 

 

 

My requirement to match the date & KPI measures and get the data from 1st table and plot them in 2nd table as below:

 

KPI Measures

02-Apr

09-Apr

16-Apr

23-Apr

Number of items Sold

10

12

14

16

Number of items in Stock

100

200

340

400

Total Sales per week

 ₹1,000

 ₹2,000

 ₹3,000

 ₹2,000

Profit per week

 ₹100

 ₹200

 ₹300

 ₹200

Profit % per week

10%

20%

20%

20%

 

Is there any possible way to achieve this? Any leads would be so helpful for me.

 

3 Replies

  • Hi,

    I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.

    Please check the below picture and the attached pbix file.

    One of ways to create this is using the Matrix visualization and check the option "Switch values to rows".

     

     

     

    • gssarathkumar's avatar
      gssarathkumar
      Helper I

      Hi, thanks for your kind reply,

      the solution which you provided acutally helps when we don't have any other column to be shown. But I do have few other columns in my soucre table as below:

      S.NoTypeKPI Measures02-Apr09-Apr16-Apr23-Apr
      1NumberNumber of items Soldxxx   
      2NumberNumber of items in Stock    
      3NumberTotal Sales per week    
      4PercentageProfit per week    
      5PercentageProfit % per week    



      Here I need to match the Date(Column Header) and KPI Measures (Row Header) with the DAX and populate the values. For Instance: DAX value of # of items sold for 2nd April should come in the cell where i put the xxx symbol. Likewise it should take the values. Kindly help on this.