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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Matrix aggregation and filtering

Hi, 

I need to group values in the matrix by Source and Destination columns.  How can I achive this? Thanks for any advice

 

Previous Segment = Source

Currenct Segment = Destination

Expected ResultExpected ResultDestination MeasureDestination MeasureSource MeasureSource Measure

"Calendar table" is not connected with "Table"

Current matrixCurrent matrixInDateRange Measure - filter applied on matrixInDateRange Measure - filter applied on matrix 

 

 

 

10 REPLIES 10
Anonymous
Not applicable

@tamerj1 

thanks, this works but the problem is when I remove person_id from the table this happens ( it is grouping all the fields in the table) and I want to achive this on first screentshot in the first post

palmal2_0-1663247040717.png

 

@Anonymous 

In the first screenshot, does each row represents on Id?

Anonymous
Not applicable

@tamerj1 No, this is grouped by source and destination and  Total Users = count(persona_id)

 

this is not easy to implement because slicer can't affect on calculated table so I've created this two measures - source and destination. I am not sure how to show only these two measures on matrix/table

@Anonymous 
Technically it is not possible as power bi does not support slicing by or grouping by measures. There must be a column. Actually it's not clear to me what does it mean to group by a measure if it has any meaning.

Anonymous
Not applicable

yes, ok I should explain it better . I am not sure if this is technically achivable but according to date range on slicer I want to take first (soruce) and last (destination) segment_name for each persona_identifier and then group this by source and destination with count on persona_identifier

 

palmal2_0-1663250358100.png

 

@Anonymous 
I can think of two possibilities. We have a good chance to do that by concatenation and a smaller chance by filter measure. Please share a sample data to work with and let me see if I can produce somthing.

Thank you

Anonymous
Not applicable

Hi @tamerj1  

sorry for late reply. here is a sample dataset

@Anonymous 

I don't see any link?

Anonymous
Not applicable

tamerj1
Super User
Super User

@Anonymous 

Please try

Source =
VAR SelectedDate =
MIN ( 'Calendar'[Date] )
VAR CurrentIDTable =
FILTER ( 'Table', 'Table'[segment date] > SelectedDate )
VAR FirstRecord =
TOPN ( 1, CurrentIDTable, 'Table'[segment date], ASC )
RETURN
MAXX ( FirstRecord, 'Table'[segment_name] )

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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