Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I want to utilise the CALCULATE MAX and ALL('Date') as follows:
Sum Range Space =
varTest = CALCULATE(MAX([SumRangeSpace1], ALL('Date')))
VAR RangeSpaceCount = CALCULATE(COUNT(' Build_Capacity'[RangeSpace]
VAR TotalCount = CALCULATE(DISTINCTCOUNT('Build_Usage'[ID]), ALL('Date'))
VAR BLANKK = BLANK()
RETURN
IF (
(
ISFILTERED ( 'Hs'[House Name] )
&& RangeSpaceCount = TotalCount
),
[SumRangeSpace1],
BLANK()
)
The underlying measure [SumRangeSpace1] is
SumRangeSpace1 = CALCULATE (
SUM( 'Build_Capacity'[RangeSpace] ),
TREATAS (
VALUES ( 'Build_Usage'[ID] ),
'Build_Capacity'[ID]
)
)
Solved! Go to Solution.
rectified this issue using
CALCULATE([SumRangeSpace1], ALL('Date'))
rectified this issue using
CALCULATE([SumRangeSpace1], ALL('Date'))
@bhanu_gautam
VAR varTest = CALCULATE(MAX([SumRangeSpace1]), ALL('Date')) doesn't work
error returned is 'The expression refers to multiple columns'
SumRangeSpace =
VAR varTest = CALCULATE(MAX([SumRangeSpace1]), ALL('Date'))
VAR RangeSpaceCount = CALCULATE(COUNT('Build_Capacity'[RangeSpace]))
VAR TotalCount = CALCULATE(DISTINCTCOUNT('Build_Usage'[ID]), ALL('Date'))
VAR BLANKK = BLANK()
RETURN
IF (
ISFILTERED('Hs'[House Name]) && RangeSpaceCount = TotalCount,
varTest,
BLANKK
)
@Tini-Bee Try using
DAX
SumRangeSpace =
VAR varTest = CALCULATE(MAX([SumRangeSpace1]), ALL('Date'))
VAR RangeSpaceCount = CALCULATE(COUNT('Build_Capacity'[RangeSpace]))
VAR TotalCount = CALCULATE(DISTINCTCOUNT('Build_Usage'[ID]), ALL('Date'))
VAR BLANKK = BLANK()
RETURN
IF (
ISFILTERED('Hs'[House Name]) && RangeSpaceCount = TotalCount,
[SumRangeSpace1],
BLANKK
)
Proud to be a Super User! |
|
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
15 | |
11 | |
11 | |
10 |