The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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! |
|
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |