Forum Discussion
lavankumar1989a
2 years agoHelper II
Need help on DAX calculation
Hi Experts, Looking for your support on creating a calcuated column to show the products information by apply sertain filters through dax. When it comes to my requirment, i have a table like bel...
- Anonymous2 years ago
Hi lavankumar1989a, thank you for your additional inforamtion!
Please check the udpdated answer:UnSoldCount = VAR SelectedStartDate = MIN('DateTable'[Date]) VAR SelectedEndDate = MAX('DateTable'[Date]) VAR AdjustedEndDate = EOMONTH(SelectedEndDate, -1) RETURN CALCULATE( COUNTROWS('Table'), FILTER( 'Table', 'Table'[Date] >= SelectedStartDate && 'Table'[Date] <= AdjustedEndDate && 'Table'[Status] = "unsold" ))UnSoldProduct = VAR SelectedStartDate = MIN('DateTable'[Date]) VAR SelectedEndDate = MAX('DateTable'[Date]) VAR AdjustedEndDate = EOMONTH(SelectedEndDate, -1) RETURN CONCATENATEX( FILTER( 'Table', 'Table'[Date] >= SelectedStartDate && 'Table'[Date] <= AdjustedEndDate && 'Table'[Status] = "unsold" ), 'Table'[Product], ", " )Result for your reference:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi lavankumar1989a, thank you for your additional inforamtion!
Please check the udpdated answer:
UnSoldCount =
VAR SelectedStartDate = MIN('DateTable'[Date])
VAR SelectedEndDate = MAX('DateTable'[Date])
VAR AdjustedEndDate = EOMONTH(SelectedEndDate, -1)
RETURN
CALCULATE(
COUNTROWS('Table'),
FILTER(
'Table',
'Table'[Date] >= SelectedStartDate &&
'Table'[Date] <= AdjustedEndDate &&
'Table'[Status] = "unsold"
))
UnSoldProduct =
VAR SelectedStartDate = MIN('DateTable'[Date])
VAR SelectedEndDate = MAX('DateTable'[Date])
VAR AdjustedEndDate = EOMONTH(SelectedEndDate, -1)
RETURN
CONCATENATEX(
FILTER(
'Table',
'Table'[Date] >= SelectedStartDate &&
'Table'[Date] <= AdjustedEndDate &&
'Table'[Status] = "unsold"
),
'Table'[Product],
", "
)
Result for your reference:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lavankumar1989a
2 years agoHelper II
Thank you so much Anonymous and much appriceated dor your support. DAX that you shared is working as expected.