Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Raj341
Frequent Visitor

Date Range selection with two independent parameters

Hi @everyone
How to get the results of Date Range selection based on two independent parameters.
I have created two independent parameters 
1. Parameter_startdate - [distinct dates from the source]
2.Parameter_end date
3.Rundate -- column
I need to use the dax query to restrict the results based on date range.
I am sharing the image for reference, I build in tableau but not able to do in powerbi

Raj341_0-1714417985113.png

PowerBI:

Raj341_2-1714418310655.png

VAR _startdate = SELECTEDVALUE(StartDate[RUN_DATE], BLANK())
VAR _Enddate = SELECTEDVALUE(EndDate[RUN_DATE], BLANK())
var _Rundate = SELECTCOLUMNS('Table','Table'[RUN_DATE])
Return
I used many conditions but not able to achieve the correct results.
first calculation helps me to restrict the data with boolean conditions.
second calculation helps me to show the last 7 days trend.
Please help me to achieve this. I am eagerly waiting for response

Note: if possible please share workbook with me, it will help a lot 
-Thanks in advance

3 REPLIES 3
Raj341
Frequent Visitor

Hi @VijayP @amitchandak 
in the above case we have to write the calculation for every single visual. but instead of that if we create a flags and keep it on the filter, it reduces number of calculations.
In tableau those calculations we keep in filter shelf to filter the records.
- please help me to fix it 🙂

VijayP
Super User
Super User

@Raj341 

VijayP_0-1714452855313.gif

 

 

Are you looking for this?

 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


amitchandak
Super User
Super User

@Raj341 , I have solved a very similar problem here

Select data between months - https://youtu.be/nEt7dT3Tfv4

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!