Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am hoping someone has a great solution for this. Is there a way to pick a date from a slicer and have that populate a column in a table with that date value? So I could then create a datediff calculation off it and another "received" date in the table? I know you can capture the value in a measure, but that doesn't help me when I'm trying to calculate for all the records in my table that have various received dates and then group the days (0-15 and > 15). I want to display a chart that groups the total number of orders in these two categories. A measure will not allow that.
Thank you so much for your help. However I needed to be able to calculate the number of days from received to date selected and then have a column where the category "0-15 or >15" would be filled in. And then tally those up. Sorry, I didn't explain it well. The column in which I provided in the sample containing the category was for providing what I wanted the end result to look like.
Hi @Anonymous ,
Try to create measures for each group, and then manually enter a disconnected group table. Please refer to:
G_>15 =
var value_ = IF(ISFILTERED(Dates[Dates]),SELECTEDVALUE(Dates[Dates]),TODAY())
return CALCULATE(COUNT('Sample'[Order #]),FILTER('Sample',ABS(DATEDIFF('Sample'[Date Received],value_,DAY))>15))
G_0-15 =
var value_ = IF(ISFILTERED(Dates[Dates]),SELECTEDVALUE(Dates[Dates]),TODAY())
return CALCULATE(COUNT('Sample'[Order #]),FILTER('Sample',ABS(DATEDIFF('Sample'[Date Received],value_,DAY))<15))
Measure = SWITCH(TRUE(),
SELECTEDVALUE('Table'[Open Category])=">15",'Sample'[G_>15],
SELECTEDVALUE('Table'[Open Category])="0-15",'Sample'[G_0-15])
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
But how do I configure the days between the Date Received and the Selected Date value in the slicer?
Hi @Anonymous ,
What fields do you need to use in the slicer? I don't understand. Please provide the results you expect based on your sample data
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Liang,
I have a date table that I use to populate the date slicer. I want to select a date from the slicer and then have a calculated column that would determine the number of days between the date received for each record in the sample data table and the date selected from the slicer. This will return a different number for each record because not all records were received on the same date. Then based on the value it returns, it would categorize it as under 15 days "0-15" or over 15 days ">15".
Does that make sense? I hope I am doing a good job explaining. Sorry if this is confusing!
Hello:
There's several ways to group or bin the data. If you can share your data model(sample) and expecteed result, I beleive there is a way to separate those two groups in a visual.
I have put the link to the sample down below. I would like the date chosen in the slicer to populate a column in the sample table so I can calculature the difference between the date received and selected date. Then bucket those days by 0-15 and >15.
https://drive.google.com/file/d/1HabW0zMpDNeqSEMU0nKoSBRn47_u01kZ/view?usp=sharing
Hi Kristisabo:
The issue calculate columns/tables are computed during database loading and then stored in the model, they do not respond to selections on the Slicers.
So it is not possible to create a calculate column/table can change dynamically with user selections on the Slicer.
We can definitely count the occrances of the two status's.
User | Count |
---|---|
25 | |
11 | |
8 | |
7 | |
6 |
User | Count |
---|---|
25 | |
13 | |
12 | |
10 | |
6 |