Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello, can someone help me with measure. Why is it so slow?
VAR maxdate =
CALCULATE ( MAX ( 'Fact'[Date] ), 'Fact'[type] = "KASA" )
VAR result =
CALCULATE ([Amount],
KEEPFILTERS ( 'Fact'[type] = "KASA" ),
KEEPFILTERS ( Date[Date] = maxdate ))
RETURN
result
@serapinasnovian , seems fine at first look.
Try this small variation
VAR maxdate =
CALCULATE ( MAX ( 'Fact'[Date] ), filter('Fact','Fact'[type] = "KASA" ))
VAR result =
CALCULATE ([Amount],
FILTERS ( 'Fact', 'Fact'[type] = "KASA" ),
FILTERS ( Date, Date[Date] = maxdate ))
RETURN
result
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |