Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi,
I want to count number of days regardless of checking that if data is in database or not. All I want is when user select date range from slicer either days or months or years. It should count the number of days including weekends and just display number of days.
For example :
Number of days = 3
Number of days = 3 * 7 = 21 days
At the moment I get count of days for which data exist in database. Whereas I want to count total number of days selected even if data is not present in database. Thanks
@Anonymous , On you slicer column, try a measure like
measure =
var _max = maxx(ALLSELECTED('Date'),'Date'[Date])
var _min = minx(ALLSELECTED('Date'),'Date'[Date])
return
datediff(_min,_max,day)+1
Thanks! This solution worked for me. I had problems with the function "AVERAGEX(VALUES ....", so I replaced it with your suggestion and it worked.
It's not working when I use the below selection I get Number of days 1 instead of 3 :
Because I don't have data in database for date 13/04/2021 and 14/04/2021. But I want to count number of days regardless of data in database.
@Anonymous , we do not have a way to know other parameters from the relative date slicer. So if dates are not present, I doubt of a way I know.
Please see below screenshots :
Showing that it brings the max date from database instead of getting it from slicer.
User | Count |
---|---|
13 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |