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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
GyMpX
Frequent Visitor

multi table with var fonction in DAX

hello!

I need some helps to do this without creating many tables and overload my model.

I have the First table and want to have the red result. I think i need to create an intermediate table (2) in a var DAX but can't use new column.

 

If you can help me...

 

GyMpX_0-1670494643673.png

 

I find a solution by create 2 intermediates tables... but I need to do this with 3 Indicators (6 tables are created....)

 

Thank you a lot for your help!

2 REPLIES 2
GyMpX
Frequent Visitor

hello! Thank you a lot for your answering but it's doesn't work... it gave me 100%

v-yadongf-msft
Community Support
Community Support

Hi @GyMpX 

 

Create following measures:

Number = COUNT('Table'[Top traitement])

rate = 
var _sum = SUM('Table'[Top traitement])
return
DIVIDE(_sum,[Number])

Measure = MAXX(FILTER(ALLEXCEPT('Table','Table'[Top traitement]),'Table'[Zone] = SELECTEDVALUE('Table'[Zone])),[rate])

Measure 2 = IF([rate] = MAXX(FILTER(ALLEXCEPT('Table','Table'[Top traitement]),'Table'[Zone] = SELECTEDVALUE('Table'[Zone])),[rate]),[Number])

Measure 3 = 
var _a = SUMX(ALLEXCEPT('Table','Table'[Top traitement]), [Measure]*[Measure 2])
var _b = SUMX(ALLEXCEPT('Table','Table'[Top traitement]),[Measure 2])
return
DIVIDE(_a,_b)

 

I think this is the result you want:

vyadongfmsft_1-1670579605289.png

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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