The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'm trying to get the highest value from a date range. below I have mentioned my dax code. it only returns the value related to slicer end date, not the highest value of the date range. Can anyone help me to figureout the issue
If you are trying to get the highest value within a selected date range, try using the Allselected...
var ASPI_VAL = CALCULATE(MAX(BI_SECTOR_HISTORIES[SECTORIAL_INDEX]),
ALLSELECTED(BI_SECTOR_HISTORIES[SECTOR_DATE]))
Hi @nisansala23
Please try
HIGHEST_ASPI_VAL =
MAXX (
DATESYTD ( 'Date'[Date] ),
CALCULATE ( MAX ( BI_SECTOR_HISTORIES[SECTORIAL_INDEX] ) )
)
User | Count |
---|---|
27 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |