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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Row based slicer

Hey guys,

 

I have a small problem and I'm not sure weather its possible to do it in PowerBI or not (it's easy in Excel though).

 

So there are 3 rows "EBIT, OPEX and Order Entry" that can be sliced/filtered on "EX_DT" or "INTS" (external/internal). HOWEVER, EBIT should NOT be affected of the two slicers and should always be the total.. I mean, act like EX_DT and INTS are selected all the time or be somehow disconnected to the slicer, while the other 2 rows should react to the slicer.

 

Is it somehow possible to achieve?

 

Unbenannt.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

A friendy coleague just helped me out, we used following measure to achieve what I was looking for, since your solution didn't work out:

 

SumValue = IF(HASONEVALUE('Table'[KPI]);
			SWITCH(VALUES('Table'[KPI]);
			"EBIT";CALCULATE(SUM('Table'[VALUE]);ALL('Table'[EX_DT_IN]));SUM('Table'[VALUE])
		))

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @Anonymous,

 

For your requirement, you can add a condition to calculate with current row content.

 

Measure sample:

Calculate=
var currKPI=LASTNONBLANK(Table[KPI],[KPI])
Return
IF(currKPI<>"EBIT", calculate(sum(Table[VALUE]),ALLSELECT(Table)),calculate(sum(Table[VALUE]),ALL(Table)))

 

 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Thank you so much, but it doesn't seem to work. Unfortunately, I'm still learning DAX and have only basic understanding and can't figure out where the error is..

 

Unbenannt.PNG

Anonymous
Not applicable

Hi @Anonymous,

 

You can put these formula and test again.

 

According to your screenshot, it seems not support ',', I'd like to suggest you use ';' character to replace ',' .

Calculate=
var currKPI=LASTNONBLANK(Table[KPI];[KPI])
Return
IF(currKPI<>"EBIT"; calculate(sum(Table[VALUE]);ALLSELECT(Table));calculate(sum(Table[VALUE]);ALL(Table)))

 

 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi @Anonymous

 

it still doesn't work. I had to change "ALLSELECT" to "ALLSELECTED", since it didn't recognize ALLSELECT as a function. But it still doesn't work. Any further ideas?

 Unbenannt.PNG

Thanks in advance and best regards.

Anonymous
Not applicable

A friendy coleague just helped me out, we used following measure to achieve what I was looking for, since your solution didn't work out:

 

SumValue = IF(HASONEVALUE('Table'[KPI]);
			SWITCH(VALUES('Table'[KPI]);
			"EBIT";CALCULATE(SUM('Table'[VALUE]);ALL('Table'[EX_DT_IN]));SUM('Table'[VALUE])
		))

Hi,

How to add slicers in row headers matrix visual in power bi.

Greg_Deckler
Community Champion
Community Champion

Use a CALCULATE with an ALL filter.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.