Forum Discussion
Line chart and Date selection
- 4 years ago
Hi PetrS ,
Create 2 measures as below:
_quantity = VAR _maxdate = CALCULATE ( MAX ( 'Table'[date] ), ALL ( 'Table' ) ) RETURN IF ( ISFILTERED ( 'Table'[date] ), SUM ( 'Table'[quantity] ), CALCULATE ( SUM ( 'Table'[quantity] ), FILTER ( 'Table', 'Table'[date] = _maxdate && 'Table'[location] = MAX ( 'Table'[location] ) ) ) )_quantitytotal = SUMX(VALUES('Table'[location]),'Table'[_quantity])And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
data
correct view ... if I choose a day
without selection table shows sum
I took some screenshots. I hope it helps. I need to see quantities in Table only for one day. I don't know ... update Table only if a one day is selected in Line chart or some conditions for Line chart selector. In the case of Stock time projection the sum is nonsense
Hi PetrS ,
Create 2 measures as below:
_quantity =
VAR _maxdate =
CALCULATE ( MAX ( 'Table'[date] ), ALL ( 'Table' ) )
RETURN
IF (
ISFILTERED ( 'Table'[date] ),
SUM ( 'Table'[quantity] ),
CALCULATE (
SUM ( 'Table'[quantity] ),
FILTER (
'Table',
'Table'[date] = _maxdate
&& 'Table'[location] = MAX ( 'Table'[location] )
)
)
)
_quantitytotal = SUMX(VALUES('Table'[location]),'Table'[_quantity])
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
- PetrS4 years agoFrequent Visitor
It works, thank you a lot.
- v-kelly-msft4 years agoCommunity Support
Hi PetrS ,
Glad to help.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!