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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jack2of3
Helper II
Helper II

Filter by multiple values with multiple fields

I have created about 40 measures in PBI but need them to display on rows. I have found I need to either do the calculations in the database query or via Power Query. I prefer Power Query for the self management (speed of changes).

I have not been able to find anything on filtering using multiple values for multiple fields.

This is the DAX Measure formula. How would it be written in Power Query "M"?

= CALCULATE (
SUM ( 'GL_BALANCES'[CLOSING_AMOUNT] )/ 1000 ,
'Funds',
'Funds'[FUND_GROUP] = "Debt Service Fund" , FILTER('Accounts','Accounts'[TYPE_DESCR] IN {"A010_Cash and cash equivalents - restricted-current", "A025_Investments - restricted-current", "A030_Investments - restricted-noncurrent", "A015_Cash and cash equivalents - restricted-noncurrent"} ))
1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

FYI that the matrix visual has a format option called "Show On Rows" that may simplify things.  If that doesn't work, please describe your scenario further, to confirm that you need to transform your data.  You should not need to do calculations like this in your query (DAX is the way to go).

 

mahoneypat_0-1629931059149.png

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
Jack2of3
Helper II
Helper II

DOHH!.😲

Thanks Pat. I was using the Matrix visual and completley skipped the option.

Anonymous
Not applicable

This is easily done via the GUI filtering dialogue. Just click on the drop down at the top of the column, select the filter options, then advanced. You can change those drop downs from value to column, and change "and" to "or" and chain your filters together pretty easily.

 

--Nate

mahoneypat
Microsoft Employee
Microsoft Employee

FYI that the matrix visual has a format option called "Show On Rows" that may simplify things.  If that doesn't work, please describe your scenario further, to confirm that you need to transform your data.  You should not need to do calculations like this in your query (DAX is the way to go).

 

mahoneypat_0-1629931059149.png

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.