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
karkar
Helper III
Helper III

Summarization

Hello,

 

I have the following table as a result of a SQL query in Power Bi and after i created a measure to have distincts by ID and value.

I now want to be able to create another table out of it to show the counts by department like below:(WANT:1)--Do i start from Query1 again? or can we use the existing table? if so how can i do that???

 

Also another table to show counts by Month like shown:

 

 

HAVE:

ID         value     Department                Month

101         0           Road Transport         Jun2016

102         0           Aviation                     Jul2017

103         5           Aviation                     Aug2017

104         0           Aviation                     Aug2016

105         1           Ship                           jan2016

106         4           Mail                           Feb2017

107         4           Mail                           Mar2016

108         4          Walk                           Mar2016

 

WANT-1:

 

Department           COUNT

Road Transport         1

Aviation                     3

Ship                           1

Mail                           2

Walk                          1

 

 

WANT-2:

 

Month                 COUNT

Jan2016                     1

Mar2016                    2

Jun2016                     1

Aug2016                    1

Feb2017                     1

Aug2017                    1

 


Thanks

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@karkar

 

Hi, Go to Edit Query and Use Group By (in Transform Tab).

 

Follow the steps:

 

Group ByGroup By

Regards,

 

Victor

Lima - Peru




Lima - Peru

View solution in original post

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@karkar

 

Hi, Go to Edit Query and Use Group By (in Transform Tab).

 

Follow the steps:

 

Group ByGroup By

Regards,

 

Victor

Lima - Peru




Lima - Peru

Thanks you Lima. That was so nice of you to have it in the form of a video. It helps a lot and is what i wanted also.

Just curious , can this also be done using DAX? If so how and which one do you prefer?

 

Thanks

Vvelarde
Community Champion
Community Champion

@karkar

 

In Dax is also possible.

 

To Create New Tables Using a original table i prefer Query Editor. They insert in to the model.

 

But if you want to just show in a visual (Not Create a table) with DAX is very simple to obtain.

 

 

 

 




Lima - Peru

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.