Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello All
In my report , I have a slicer for "Sales Date" in a "between style".
How do I retrieve the "From Date" to "To Date" in to a variable ?
Thanks
Solved! Go to Solution.
Hi, @zahirmohideen
You can try @amitchandak way. If it does not work, you can try the following DAX.
DAX:
startDate = CALCULATE(MIN('Date'[Date]),ALLSELECTED('Date'))
endDate = CALCULATE(MAX('Date'[Date]),ALLSELECTED('Date'))
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, @zahirmohideen
You can try @amitchandak way. If it does not work, you can try the following DAX.
DAX:
startDate = CALCULATE(MIN('Date'[Date]),ALLSELECTED('Date'))
endDate = CALCULATE(MAX('Date'[Date]),ALLSELECTED('Date'))
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
@zahirmohideen , You can use following
Measure =
var _max = maxx(allselected(Date), Date[Date])
var _min = minx(allselected(Date), Date[Date])
return
<Your measure code>
User | Count |
---|---|
84 | |
76 | |
75 | |
43 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
43 |