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
ashamsuzzoha
Helper III
Helper III

Help with allexcept() on a crossfilter

I want to plot a measure by time and an average of that measure without a crossfilter applied. Table1 is an extract of the fact table. Table2 is a dim table. Measure 2 is supposed to be Measure 1 but ignoring any filter of Division. 

 

table1

FeederYearvar1var2var3
11242015No1141566
11242015Yes1141566
11242016No513167
11242016Yes067
11242017No9167
11242017Yes9167
11242018No2760467
11242018Yes2760467
11242019No1561867
11242019Yes1478867
103062015No103180672
103062015Yes96634672
103062016No151865684
103062016Yes141609684
103062017No732202683
103062017Yes310553683
103062018No363365692
103062018Yes126651692
103062019No125559699
103062019Yes123130699
130142015No66386976
130142015Yes29464976
130142016No20955977
130142016Yes20955977
130142017No2784341025
130142017Yes282371025
130142018No1308101089
130142018Yes1253531089
130142019No395871126
130142019Yes394701126
143462015No1945261080
143462015Yes1939321080
143462016No501841083
143462016Yes431261083
143462017No2642051084
143462017Yes2169481084
143462018No4431421073
143462018Yes3126031073
143462019No3044661073
143462019Yes2760031073

 

table 2

FeederDivision
1124A
10306B
13014C
14346D

 

 

Measure1 = 
CALCULATE(
    DIVIDE(
        SUM('Table1'[var2]),
        SUM('Table1'[var3])
    ),
    'Table1'[var1] = "Yes"
)
Measure2= 
CALCULATE(
    [Measure1],
    ALLEXCEPT(
        'Table1', 
        'Table1'[Year].[Year],
        'Table1'[var1]
        )
)

 

 

But when I put compare measure1 and measure2, it's not ignoring the crossfilter.

Not Filtered

YearMeasure1Measure2
2019152.9152.9
2018202.7202.7
2017194.4194.4
201673.273.2
2015118.6118.6

 

Filtered

YearMeasure1Measure2
2019176.2176.2
2018183183
2017454.7454.7
2016207207
2015143.8143.8

 

Basically, i want to plot Mesure1 from Filtered and Measure2 from Not Filtered with DAX only. Can someone help me out? Thanks

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Does this work?

Measure2 = calculate([measure1],all('Table1'[Division]))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Does this work?

Measure2 = calculate([measure1],all('Table1'[Division]))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I think you meant to type "table2[division], but yes, that worked. thanks

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.