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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Mac2
New Member

Calculate measure with unique value from another table

Hi,

 

I have a measure that I am using in a matrix as show below:

           HT1    HT2 HT3 HT4 HT5

A         32      34    30     31  33

B         30      31    33     32   31

C        28      25     29    32    30 

 

I have another table

Term  Days

HT1    34 

HT2    39 

HT3    33 

HT4    35

HT5    36

 

I am trying to write a measure that perform a division eg

 

           HT1        HT2        HT3       HT4      HT5

A         32/34      34/39    30/33    31/35   33/36

B         30/34      31/39    33/33    32/35    31/36

C        28/34      25 /39    29/33    32/35     30/36 

 

How can I write this measures? I also need to multiply these number by 100 to work out the percentage. 

 

Thanks in Advance

Mac2

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Mac2 

try like:

Measure2=
VAR _days =
MINX(
    FILTER(
        ALL(AnotherTable),
        AnotherTable[Term] = MAX(Table1[Term])
    ),
    AnotherTable[Days]
)
RETURN
DIVIDE([measure], _days)

View solution in original post

2 REPLIES 2
Mac2
New Member

Thank you so much for your help. Much appricated! 😊

FreemanZ
Super User
Super User

hi @Mac2 

try like:

Measure2=
VAR _days =
MINX(
    FILTER(
        ALL(AnotherTable),
        AnotherTable[Term] = MAX(Table1[Term])
    ),
    AnotherTable[Days]
)
RETURN
DIVIDE([measure], _days)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.