Forum Discussion

Kubrasenses_'s avatar
Kubrasenses_
Frequent Visitor
2 years ago

Parameter is not working because of RSCustomDaxFilter on the power bi report builder

Hello Everyone,
I have project on the power bi report builder. I wanna to add paramaters . I can add 3 paramaters  but if i add  more than paramater is not working. My error code like that:

Query ( The name '<ccon>RSCustomDaxFilter</ccon>' could not be resolved. It is not a valid table, variable, or function name.

this is my dataset query folder:


DEFINE VAR vFromFLDimCalendarcalendardate1 = IF(PATHLENGTH(@FromFLDimCalendarcalendardate) = 1, IF(@FromFLDimCalendarcalendardate <> "", @FromFLDimCalendarcalendardate, BLANK()), IF(PATHITEM(@FromFLDimCalendarcalendardate, 2) <> "", PATHITEM(@FromFLDimCalendarcalendardate, 2), BLANK()))
VAR vFromFLDimCalendarcalendardate1ALL = PATHLENGTH(@FromFLDimCalendarcalendardate) > 1 && PATHITEM(@FromFLDimCalendarcalendardate, 1, 1) < 1
VAR vToFLDimCalendarcalendardate1 = IF(PATHLENGTH(@ToFLDimCalendarcalendardate) = 1, IF(@ToFLDimCalendarcalendardate <> "", @ToFLDimCalendarcalendardate, BLANK()), IF(PATHITEM(@ToFLDimCalendarcalendardate, 2) <> "", PATHITEM(@ToFLDimCalendarcalendardate, 2), BLANK()))
VAR vToFLDimCalendarcalendardate1ALL = PATHLENGTH(@ToFLDimCalendarcalendardate) > 1 && PATHITEM(@ToFLDimCalendarcalendardate, 1, 1) < 1
EVALUATE SUMMARIZECOLUMNS('FL_Dim_Calendar'[calendar_date], 'FL_Dim_ArticleCategoryGroup'[article_category_group_desc_eng], 'FL_Dim_ArticleBrand'[article_brand_desc_eng], 'salesHierarchy'[countryCode], 'salesHierarchy'[salesCenter], 'salesHierarchy'[asm], FILTER(VALUES('FL_Dim_Calendar'[calendar_date]), (vFromFLDimCalendarcalendardate1ALL || 'FL_Dim_Calendar'[calendar_date] >= DATEVALUE(vFromFLDimCalendarcalendardate1) + TIMEVALUE(vFromFLDimCalendarcalendardate1)) && (vToFLDimCalendarcalendardate1ALL || 'FL_Dim_Calendar'[calendar_date] <= DATEVALUE(vToFLDimCalendarcalendardate1) + TIMEVALUE(vToFLDimCalendarcalendardate1))),

RSCustomDaxFilter(@salesHierarchyasm,EqualToCondition,[salesHierarchy].[asm],String), RSCustomDaxFilter(@salesHierarchysegment,EqualToCondition,[salesHierarchy].[segment],String),
"Penetrasyon", [Penetrasyon], "Outlet Count", [Outlet Count])


I don't know why this function is not working. Anyone could you resolve this problems?





1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Kubrasenses_ ,

    I think you should create a query parameter and set its value to that of the existing report parameter (in Dataset Properties > Parameters).

    Also, you should avoid Query Designer (in my experience).

    For completeness, the full set of steps I followed:

    1. Create a new Dataset
    2. In the Dataset Properties dialog box, in Parameters section, click Add.
    3. Enter Parameter Name
      This can be the same name or a different name from the existing report parameter, as it is scoped to the query.
    4. For Parameter Value, select the existing report parameter from the dropdown.
    5. Go to Query section of Dataset Properties dialog box.
    6. Specify Name & Data source
    7. Don't click Query Designer. Enter or paste DAX query into Query dialog box, incorporating the query parameter defined above.
    8. Click Validate Query to confirm it works, then OK.

    Best Regards,

    Xianda Tang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.