Forum Discussion
Date parameter report builder format
- 3 years ago
Just in case it might be usefull for someone, here is what makes it work:
DEFINE VAR vFromInformeStockDelegaciF3nJDFEC1 = IF(PATHLENGTH(@FromInformeStockDelegaciF3nJDFEC) = 1, IF(@FromInformeStockDelegaciF3nJDFEC <> "", @FromInformeStockDelegaciF3nJDFEC, BLANK()), IF(PATHITEM(@FromInformeStockDelegaciF3nJDFEC, 2) <> "", PATHITEM(@FromInformeStockDelegaciF3nJDFEC, 2), BLANK()))
VAR vFromInformeStockDelegaciF3nJDFEC1ALL = PATHLENGTH(@FromInformeStockDelegaciF3nJDFEC) > 1 && PATHITEM(@FromInformeStockDelegaciF3nJDFEC, 1, 1) < 1
EVALUATE SUMMARIZECOLUMNS('Informe Stock Delegación'[JDFEC], 'Informe Stock Delegación'[Compañia], 'Informe Stock Delegación'[TOTAL PALLETS_STOCK], RSCustomDaxFilter(@InformeStockDelegaciF3nCompaF1ia,EqualToCondition,[Informe Stock Delegación].[Compañia],String), FILTER(VALUES('Informe Stock Delegación'[JDFEC]), (vFromInformeStockDelegaciF3nJDFEC1ALL || 'Informe Stock Delegación'[JDFEC] >= DATEVALUE(@FromInformeStockDelegaciF3nJDFEC) + TIMEVALUE("00:00:00"))))
Hello,
Thanks for the answer but I am not really sure about how to apply the modification.
So far I have been modifying the query for something like this using FORMAT() (modification in red):
Hi Foguete ,
You modify position is not correct, please try below modification (see red color part):
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Foguete3 years agoHelper I
Anonymous
Thanks, but your code is throwing the following error:
Query (5, 16) DAX comparison operations do not support comparing values of type Date with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
Do you have any idea where could it come from ?
- Anonymous3 years agoNot applicable
Hi Foguete ,
Please try below:
DEFINE VARvFromInformeStockDelegaciF3nJDFEC1 =IF(PATHLENGTH(@FromInformeStockDelegaciF3nJDFEC) = 1,IF(@FromInformeStockDelegaciF3nJDFEC <> "", @FromInformeStockDelegaciF3nJDFEC, BLANK()),IF(PATHITEM(@FromInformeStockDelegaciF3nJDFEC, 2) <> "", PATHITEM(@FromInformeStockDelegaciF3nJDFEC, 2), BLANK()))VARvFromInformeStockDelegaciF3nJDFEC1ALL =PATHLENGTH(@FromInformeStockDelegaciF3nJDFEC) > 1 && PATHITEM(@FromInformeStockDelegaciF3nJDFEC, 1, 1) < 1EVALUATESUMMARIZECOLUMNS('Informe Stock Delegación'[JDFEC], 'Informe Stock Delegación'[Compañia], 'Informe Stock Delegación'[TOTAL PALLETS_STOCK],RSCustomDaxFilter(@InformeStockDelegaciF3nCompaF1ia,EqualToCondition,[Informe Stock Delegación].[Compañia],String),FILTER(VALUES('Informe Stock Delegación'[JDFEC]), (vFromInformeStockDelegaciF3nJDFEC1ALL || DATEVALUE('Informe Stock Delegación'[JDFEC]) >= DATEVALUE(vFromInformeStockDelegaciF3nJDFEC1) + TIMEVALUE(vFromInformeStockDelegaciF3nJDFEC1))))Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Foguete3 years agoHelper I
Hi Anonymous,
Unfortunately no, still the same message. I am also looking into it but cannot find the solution either