cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Display measure in subtotal for one row in matrix

hi

i have matrix with 3 rows and i want display subtotals for each row in matrix but create measure for one row

example:

i need to display Table1[values] for each row except total for date row

for subtotal of date row i need to display Table1[diff]:

but also i need to display Table1[values] in subtotals for rows Group 1 and Group 2:

i was playing with hasonevalue and isinscope functions but no success (i've created measure which displays table1[diff] in all subtotals instead of just in subtotal for date row)

here a link to pbi file

thanks

1 ACCEPTED SOLUTION
Community Support

Hi  @zaka88 ,

The two values below have the same meaning ,which means they should keep the same:

So do you want it to be -17 or 1904?

Best Regards,
Kelly

8 REPLIES 8
Super User
Frequent Visitor

i hope that it helps me, but i have no idea how to use it in right way.

results of using isinscope() are same for group2 row and for date row, but i need to display value just for date row...

Community Support

Hi @zaka88 ,

Create a measure as below:

``````Measure =
IF(ISINSCOPE(Table1[group 2]),[diff],
CALCULATE(SUM('Table1'[Value]),FILTER(ALL(Table1),'Table1'[group 1]=MAX('Table1'[group 1]))))``````

And you will see:

If I misunderstood your point,pls correct me.

For the related .pbix file,pls see attached.

Best Regards,
Kelly

Frequent Visitor
``````thanks for your comment.

but i need display [diff] in subtotal for date

and SUM('Table1'[Value]) in all other rows (for values and for subtotals of group1 and group2).

result should be like that:``````

Community Support

Hi  @zaka88 ,

Create a measure as below:

``````Measure =
var _fir= ISINSCOPE('Calendar'[Date])
var _sec=ISINSCOPE(Table1[group 2])
var _thi=ISINSCOPE(Table1[group 1])
return
IF(_fir&&_sec&&_thi, [Values] ,IF((_fir=FALSE())&&_sec&&_thi,[Value at max date]-[Value at min date],IF((_fir=FALSE())&&(_sec=FALSE())&&_thi,CALCULATE(SUM('Table1'[Value]),FILTER(ALL(Table1),'Table1'[group 1]=MAX('Table1'[group 1]))))))``````

And you will see:

For the related .pbix file,pls see attached.

Best Regards,
Kelly

Frequent Visitor

yeah, almost done. just need change value in subtotal for group2:

thanks a lot for your help

Community Support

Hi  @zaka88 ,

The two values below have the same meaning ,which means they should keep the same:

So do you want it to be -17 or 1904?

Best Regards,
Kelly

Frequent Visitor

yes, now i understand that this 2 values have the same meaing....

thanks

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors