Forum Discussion
Anmolgan
Post Prodigy
7 years agoHow to right dynamic DAX queries?
I have a few dates for a specific company below is an example: CompanyName Effective Date Rates FH1 2016-07-01 230 FH1 201...
- Anonymous7 years ago
Hi Anmolgan ,
You can try to use following measure formula to find out next date-1 based on current company and effective date:
Measure = VAR currDate = MAX ( Table[Effective Date] ) VAR endDate = CALCULATE ( MIN ( Table[Effective Date] ), FILTER ( ALLSELECTED ( Table ), [Effective Date] > currDate ), VALUES ( Table[CompanyName] ) ) RETURN IF ( endDate <> BLANK (), endDate - 1 )Regards,
Xiaoxin Sheng
Anonymous
7 years agoNot applicable
Hi Anmolgan ,
You can try to use following measure formula to find out next date-1 based on current company and effective date:
Measure =
VAR currDate =
MAX ( Table[Effective Date] )
VAR endDate =
CALCULATE (
MIN ( Table[Effective Date] ),
FILTER ( ALLSELECTED ( Table ), [Effective Date] > currDate ),
VALUES ( Table[CompanyName] )
)
RETURN
IF ( endDate <> BLANK (), endDate - 1 )
Regards,
Xiaoxin Sheng
- Anmolgan7 years ago
Post Prodigy
Anonymous
Hi thanks for the answer, do you know what needs to be done if I want to find the dates between start and end date? I want to have certain date periods between those start and end date ranges, so that I can plot that specifc date into powerbi and can find results for a specific month?