March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
Good afternoon,
I have the following calculation
Match Up Count Rows = CALCULATE(COUNTROWS('Game Fact'),FILTER('Game Fact','Game Fact'[Game Board]IN ALLSELECTED('Game Fact'[Game Board])))
If I place that measure in a table with Game ID, I get the following:
Is there a way that I can store the Game IDs where the Result is equal to 22 into a variable? I would then like to be able to use that variable as part of a FILTER component for further CALCULATE expressions?
Kind regards,
Paul
Solved! Go to Solution.
You could use something like this, also you can replace the whole FILTER with KEEPFILTERS and ALLSELECTED.
Match Up Count Rows =
VAR Something =
FILTER (
VALUES ( GameID ),
CALCULATE (
COUNTROWS ( 'Game Fact' ),
KEEPFILTERS ( ALLSELECTED ( 'Game Fact'[Game Board] ) )
) = 22
)
RETURN
Something
You could use something like this, also you can replace the whole FILTER with KEEPFILTERS and ALLSELECTED.
Match Up Count Rows =
VAR Something =
FILTER (
VALUES ( GameID ),
CALCULATE (
COUNTROWS ( 'Game Fact' ),
KEEPFILTERS ( ALLSELECTED ( 'Game Fact'[Game Board] ) )
) = 22
)
RETURN
Something
This is brilliant, thank you so much.
Kind regards,
Paul
You're welcome! 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
126 | |
85 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |