We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello,
I am trying to get some dynamic filtering going on a Power Bi model im working on. I have a list of contracts and their start and end dates. I want the user to be able to pick a month (on the dashboard) and it will show them on the dashboard the contracts that are live on these dates.
I did manage to get it working for if the contract start date is the same as said month but im having trouble with the measure formula to include contracts that are live.
To sepcify i need the contracts to show where StartDate<SaidMonth and EndDate> Said month.
Does anyone have a solution?
Thanks
Solved! Go to Solution.
Thansk for the help guys, My collegue managed to find a solution here:
https://community.powerbi.com/t5/Desktop/Filtering-within-a-date-range/td-p/227767
I will try and test your solutions out when i get chance. Always good to know multiple ways to do things.
In Home->Enter Date, enter month value from 1 to 12, then in this table, create a measure
selectmonth = SELECTEDVALUE(Table1[month])
Then In the orginal table,create calculated columns
startmonth = MONTH([start date]) endmonth = MONTH([end date])
Next create a measure
Measure = IF([selectmonth]<=MAX([endmonth])&&[selectmonth]>=MAX([startmonth]),1,0)
Finally, add this measure to the Visual level Filter
Best Regards
Maggie
Thansk for the help guys, My collegue managed to find a solution here:
https://community.powerbi.com/t5/Desktop/Filtering-within-a-date-range/td-p/227767
I will try and test your solutions out when i get chance. Always good to know multiple ways to do things.
Try the below logic,
Num of Contracts = CALCULATE(COUNT([Contracts ID]),FILTER(TableName,StartDate<SaidMonth && EndDate> Said month))
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 38 | |
| 33 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 66 | |
| 41 | |
| 34 | |
| 25 |