Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rajendraongole1
Post Prodigy
Post Prodigy

Column wise category Name total sales representation

Dear all,

 

I have a source data with below information and i want to represent column wise categorical total sales representaion 

 

any suggestions:

suggest the solution in table visual:

Source:

 

Supplier NameTotal Sales
Category2000
Product4000
Segment5000
Manufacturer6000

 

Output:

 

DateCategoryProductSegmentManufacturer
1/1/2000200040005000

6000

 

 

 

Regards,

Rajendra

1 ACCEPTED SOLUTION

Hi @rajendraongole1 

Your expect Output:

Date Category Product Segment Manufacturer
1/1/2000 2000 4000 5000

6000

We can see Date column in the result you want but we couldn't find Date column in your sample. So you need to add a Date column in your sample.

1.png

Then select Supplier Name column and use Pivot function.

2.png

I suggest you to transform your table by Power Query, dax will be complex when transform a table.

For reference: Power BI DAX Tutorial: How to PIVOT Data Using DAX

 

Best Regards,
Rico Zhou

 

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

View solution in original post

4 REPLIES 4
Tahreem24
Super User
Super User

@rajendraongole1 , I recommend to use the Pivot Table from Power Query to get the best output. But if insist to do using DAX so here is the answer. You need to a create new Table and enter DAX like this:


Table 2 = SUMMARIZE('Table','Table'[Supplier Name],
"Date",DATE(2000,1,1),
"Category",CALCULATE(SUM('Table'[Total Sales]),'Table'[Supplier Name]="Category"), "Segment",CALCULATE(SUM('Table'[Total Sales]),'Table'[Supplier Name]="Segment"),
"Product",CALCULATE(SUM('Table'[Total Sales]),'Table'[Supplier Name]="Product"),
"Manufacturer",CALCULATE(SUM('Table'[Total Sales]),'Table'[Supplier Name]="Manufacturer")
)
 
Capture.JPG
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
rajendraongole1
Post Prodigy
Post Prodigy

thank you @VahidDM 

 

expecting this logic to implement using dax function?

 

any possiblities?

 

I tried with pivot but the out put values not getting as expected. 

 

 

Hi @rajendraongole1 

Your expect Output:

Date Category Product Segment Manufacturer
1/1/2000 2000 4000 5000

6000

We can see Date column in the result you want but we couldn't find Date column in your sample. So you need to add a Date column in your sample.

1.png

Then select Supplier Name column and use Pivot function.

2.png

I suggest you to transform your table by Power Query, dax will be complex when transform a table.

For reference: Power BI DAX Tutorial: How to PIVOT Data Using DAX

 

Best Regards,
Rico Zhou

 

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

VahidDM
Super User
Super User

Hi @rajendraongole1 

 

See these links:

https://support.microsoft.com/en-us/office/pivot-columns-power-query-abc9c8da-3be9-44c4-886e-0be331a...

https://community.powerbi.com/t5/Community-Blog/Pivot-your-Data-using-Power-Query/ba-p/224019

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!!

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.