Forum Discussion
tanyatessteam
5 years agoFrequent Visitor
Dax Filter/Parameters
I am trying to add parameters to a DAX query in Report Builder for Power Bi. I am using my query from Power Bi Desktop by copying the query with performance analyzer. I cannot get the filter/parame...
- 5 years ago
Well it was not very technical! I added the date to the data source and didn't use my date table so that I could build the query and parameter in Power BI Report Builder instead of using the DAX query from Power Bi desktop.
Icey
5 years agoCommunity Support
Hi tanyatessteam ,
How about this?
// DAX Query
DEFINE
VAR __DS0FilterTable =
FILTER(
KEEPFILTERS(VALUES(Date'[MonthInCalendar])),
PATHCONTAINS (@MonthYear,Date'[MonthInCalendar])))
VAR __DS0Core =
SUMMARIZECOLUMNS(
'G_LEntries'[G_L_Account_No],
'G_LEntries'[G_L_Account_Name],
'Chart_of_Accounts'[Account_Category],
'Chart_of_Accounts'[AccountCategoryIndex],
'Chart_of_Accounts'[Account_Subcategory_Descript],
'Date'[MonthInCalendar],
'G_LEntries'[District],
"SumDebit_Amount", CALCULATE(SUM('G_LEntries'[Debit_Amount])),
"SumCredit_Amount", CALCULATE(SUM('G_LEntries'[Credit_Amount])),
"SumAmount", CALCULATE(SUM('G_LEntries'[Amount]))
)
VAR __DS0PrimaryWindowed =
__DS0Core
EVALUATE
__DS0PrimaryWindowed
ORDER BY
'G_LEntries'[G_L_Account_No],
'G_LEntries'[G_L_Account_Name],
'Chart_of_Accounts'[Account_Category],
'Chart_of_Accounts'[AccountCategoryIndex],
'Chart_of_Accounts'[Account_Subcategory_Descript],
'Date'[MonthInCalendar],
'G_LEntries'[District]
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.