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
EpicTriffid
Helper IV
Helper IV

Isolating values from specific column in matrix

Hi all,

 

Bit of a difficult one to explain this, but in the screenshot below, I am attempting to calculate the difference between forecasted student numbers in the future, and the actual financial year we are currently in (ignore the fact that it says 21/22 instead of 22/23).

 

stu num ss.PNG

 

So at the moment I am attempting to isolate the values in the 2021/22 column and bring them into the 1 Year Diff %, 3 Year Diff % and 5 Year Diff % columns. I have the differences, that's fine. All I need it to make those Diff columns show the values in 2021/22 so it would look like this (1 row as example):

 

 2019/202020/212021/222022/232023/242024/252025/262027/281 year diff3 year diff5 year diff
UGFE196149163172175178180182163163163

 

The values in 2021/22 could be changed by any of the slicers at the top of the page, which would then be reflected in the values in the 1, 3 and 5 year diff columns.

 

I have tried ALLEXCEPT as below, but when i take into account all the columns that could be filtered, it blanks out everything except the totals, as you can see in the screenshot below:

 

 

CALCULATE(
    SUM('Base Data'[Total Student Count]), 
    ALLEXCEPT(
        'Base Data', 
        'Base Data'[Department],
        'Base Data'[Faculty],
        'Base Data'[Mode and Code],
        'Base Data'[Course Mode],
        'Base Data'[Fee Status],
        'Base Data'[Course Title],
        'Base Data'[Forecast/Actuals],
        'Base Data'[Course Level (Grp 2)], 
        'Base Data'[Course Level (Grp 1)], 
        'Base Data'[Numbers Type]),
    'Base Data'[Course Year of Study] = 1, 
    'Base Data'[Year Index] = 3)

 

 

stu num ss 2.PNG

 

I feel like I'm really close on this, but that I'm just not understanding ALLEXCEPT enough to make it work.

 

Any help would be greatly appreciated!

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @EpicTriffid 

Did you create the dax in measure, you can try to put the dax in a measure, then put the measure to the matrix

 

 

measure=
CALCULATE(
    SUM('Base Data'[Total Student Count]), 
    ALLEXCEPT(
        'Base Data', 
        'Base Data'[Department],
        'Base Data'[Faculty],
        'Base Data'[Mode and Code],
        'Base Data'[Course Mode],
        'Base Data'[Fee Status],
        'Base Data'[Course Title],
        'Base Data'[Forecast/Actuals],
        'Base Data'[Course Level (Grp 2)], 
        'Base Data'[Course Level (Grp 1)], 
        'Base Data'[Numbers Type]),
    'Base Data'[Course Year of Study] = 1, 
    'Base Data'[Year Index] = 3)

 

 

If it cannot work, can you provide sample pbix file?

Best Regards!

Yolo Zhu

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.