Forum Discussion
lavankumar1989a
Helper II
2 years agoNeed 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.
Irwan
Super User
2 years agohello lavankumar1989a
please check if this accomodate your need.
as far as i know, there are two ways to show your goal.
1. you can use measure
- create a new measure
Unsold = COUNTROWS(FILTER('Table','Table'[Status]="Unsold"))
- plot your data in table and/or card visual
2. you can use visual filter
- plot you data in table then tick "Unsold" using visual filter for showing only Unsold
Also I find your result is weird, you said theresult should be Bike and Bus, but there is one Auto with Unsold status on 25-12-2023.
Hope this will help you.
Thank you.