Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
If a user selects this Settled Date range,
I want the CR001_Reporting_Period_Start_Date to match '6/1/2020' &
CR001_Reporting_Period_Start_Date to match '6/30/2020'
So pretty much dynaically update the field to whatever the user selected in the filter. Is this possible?
Thanks for any help in advance!
Jay
Solved! Go to Solution.
Hi, @Anonymous
Based on your description, I created datat to reproduce your scenario. The pbix file is attached in the end.
Table:
Calendar(a calculated table):
Calendar = CALENDAR(DATE(2020,6,1),DATE(2020,12,31))
There is no relationship between two tables. You may create two measures as below.
CR001_Reporting_Period_Start_Date =
CALCULATE(
MIN('Calendar'[Settled Date]),
ALLSELECTED('Calendar'[Settled Date])
)
CR001_Reporting_Period_End_Date =
CALCULATE(
MAX('Calendar'[Settled Date]),
ALLSELECTED('Calendar'[Settled Date])
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Based on your description, I created datat to reproduce your scenario. The pbix file is attached in the end.
Table:
Calendar(a calculated table):
Calendar = CALENDAR(DATE(2020,6,1),DATE(2020,12,31))
There is no relationship between two tables. You may create two measures as below.
CR001_Reporting_Period_Start_Date =
CALCULATE(
MIN('Calendar'[Settled Date]),
ALLSELECTED('Calendar'[Settled Date])
)
CR001_Reporting_Period_End_Date =
CALCULATE(
MAX('Calendar'[Settled Date]),
ALLSELECTED('Calendar'[Settled Date])
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try like
measure =
var _max = maxx(allselected(Date),Date[Date])
var _min = minx(allselected(Date),Date[Date])
return calculate(sum(Table[column]), filter(Allselected(Table),Table[CR001_Reporting_Period_Start_Date]=_min && Table[CR001_Reporting_Period_Start_Date]=_max))
measure =
var _max = maxx(allselected(Date),Date[Date])
var _min = minx(allselected(Date),Date[Date])
return calculate(sum(Table[column]), all(Table[Settled Date]),filter(Table,Table[CR001_Reporting_Period_Start_Date]=_min && Table[CR001_Reporting_Period_Start_Date]=_max))
Hi Amit.
I don't use Dax as much. Trying to use your code keeps erroring out for me. Here are some details.
Table = 'Query1'
Date slicer field = 'SettledDate'
CR0001_Reporting_Period_start_Date should be '6-1-2020' based on the settled date filter
CR0002_Reporting_Period_End_Date should be '6-30-2020' based on the settled date filter
What exactly does the measure need to be?
Thanks a bunch!
Jay
Hi @Anonymous,
You are gonna need 2 measures here, getting min and max of the selected date, something like:
Measure1 =
VAR _dtStart = MINX(TABLE[DATE], [DATE])
RETURN CALCULATE(SUM(TABLE[VALUES]), FILTER(ALL(TABLE([DATE]), [DATE] = _dt_Start))
Measure1 =
VAR _dtEnd= MAXX(TABLE[DATE], [DATE])
RETURN CALCULATE(SUM(TABLE[VALUES]), FILTER(ALL(TABLE([DATE]), [DATE] = _dtEnd))
I don't use Dax as much. Trying to use your code keeps erroring out for me. Here are some details.
Table = 'Query1'
Date slicer field = 'SettledDate'
CR0001_Reporting_Period_start_Date should be '6-1-2020' based on the settled date filter
CR0002_Reporting_Period_End_Date should be '6-30-2020' based on the settled date filter
What exactly does the measure need to be?
Thanks a bunch!
Jay
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
119 | |
83 | |
47 | |
42 | |
33 |
User | Count |
---|---|
190 | |
78 | |
72 | |
54 | |
45 |