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
myonaiz
Employee
Employee

Summarize filtered table

Hi, I have a table Like the following

 

App IdDateLocationCount
12020-1-1USA2
12020-1-2USA3
22020-1-1China5
22020-1-3China10
32020-1-2USA4

 

I created a summarized table using the following DAX Expression

 

 

 

 

SummarizedTable = SUMMARIZE(Table, Table[App Id], "CountSummarized", SUM(Table[Count])) 

 

 

 

 

 

I also created a graph that renders a histogram of the number of app Ids per each count bucket. I do not know if it is possible or no but I want to add the Date and Location columns above as filters but not summarization dimensions. in other words I want the data that gets fed to the summarization DAX expression to change based on filters (slicers) on Location and Date. any idea how I can do that?


Thanks a lot in advance 

2 ACCEPTED SOLUTIONS

Hi,

Create a Table visual and drag App Id there.  Write this measure

Measure = SUM(Data[Count])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

The simple aggregation will do that. No need to use summarize. Other thing you should do is create a Date Calendar dimension and join it with your tables. You can also have dimensions for USA and ID as per need. Try to have a star schema

 

Refer : https://docs.microsoft.com/en-us/power-bi/guidance/

 

you can simply use sum in Visual or create a measure

Counts = sum(Table[Count])

 

I am hosting a webinar on 25th April on Power BI, Check Details - https://www.linkedin.com/posts/amitchandak78_webinar-tech-techforgood-activity-6658266754378231808-y...

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Please explain the business context and for the data that you shared in the original post, please show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I am sorry I do not understand what you mean by the bussiness context.

 

but for the table I shared here is the expected result:

 

original table for reference:

App IdDateLocationCount
12020-1-1USA2
12020-1-2USA3
22020-1-1China5
22020-1-3China10
32020-1-2USA4

 

No filters applied the data should be: (just summarizing all rows by app id and summing the count)

 

App IdCount
15
215
34

 

with the user for example choosing USA: (just summarizing all rows in location USA)

 

App IdCount
15
34

 

with the user for example choosing date 2020-1-1: (just summarizing all rows that happened on 2020-1-1)

 

App IdCount
12
25

 

 

The simple aggregation will do that. No need to use summarize. Other thing you should do is create a Date Calendar dimension and join it with your tables. You can also have dimensions for USA and ID as per need. Try to have a star schema

 

Refer : https://docs.microsoft.com/en-us/power-bi/guidance/

 

you can simply use sum in Visual or create a measure

Counts = sum(Table[Count])

 

I am hosting a webinar on 25th April on Power BI, Check Details - https://www.linkedin.com/posts/amitchandak78_webinar-tech-techforgood-activity-6658266754378231808-y...

Hi, your solution is what I want but I can't use it because I need to render this measure in a graph. trying to do that on a simple bar graph failed in power bi. when I change the measure to a column my problem is back which makes sense. the measure summarizes the data itself. but unfourtunatly I can't use this measure, any other alternative, please?

Hi,

Create a Table visual and drag App Id there.  Write this measure

Measure = SUM(Data[Count])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.