Forum Discussion
murali5431
5 years agoHelper III
Combining OR & AND in multi-value parameters
Hi, I have 3 parameters in my report query. The system generated DAX is as follows. I need to modify below query such that either I enter a combination of [CNTR] & [CNTR_DT] or enter just enter [...
Hariharan_R
5 years agoSolution Sage
Hi Murali,
Use custom DAX query option and use the below code.
Table = SUMMARIZECOLUMNS (
'Data'[CNTR], 'Data'[CNTR_DT], 'Data'[SUPP_LD_NO],
FILTER (
Data,
(FORMAT ( Data[CNTR_DT], "YYYY-MM-DD" )
<= FORMAT ("2020-01-01", "YYYY-MM-DD" )
&& (PATHCONTAINS ( "A", DATA[CNTR] )))
|| PATHCONTAINS ("1ABC", DATA[SUPP_LD_NO])
))
You need to add expression for parameters - Join(Parametername,"|") as like to make it work. Also you need to handle ALL in case if it is blank
Thanks
Hari
murali5431
5 years agoHelper III
Hariharan_R .. I am unable to replicate your suggestion into my program, as it is still asking me to enter values in other fields. Can you let me know how I can modify below to accomplish it.
EVALUATE SUMMARIZECOLUMNS('Data'[CNTR], 'Data'[CNTR_DT], 'Data'[SUPP_LD_NO], RSCustomDaxFilter(@DataCNTR,EqualToCondition,[Data].[CNTR],String), RSCustomDaxFilter(@DataCNTRDT,EqualToCondition,[Data].[CNTR_DT],DateTime), RSCustomDaxFilter(@DataSUPPLDNO,EqualToCondition,[Data].[SUPP_LD_NO],String))
Thanks for your help!
Muralidhar