Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Experts,
I have a requirement where i have to filter the reports on the basis of two dimensions with OR condition. The table descriptions are in the attached image and the filter to apply in the report is Dim_Table_1.year>=2014 or Dim_Table_2.Year>=2015.
Hi anandtiwari,
Based on your description, you want to use [YEAR] columns in two Dim tables to filter the Fact_table, right?
You can create a measure in Fact table using DAX below:
Measure = CALCULATE(aggregation, FILTER(Fact_Table, RELATED(Dim_Table_1[YEAR]) >= 2014 || RELATED(Dim_Table_2[YEAR]) >= 2015))
Regards,
Jimmy Tao
Thank you for this suggestion Jimmy, Now the requirement is User needs to enter the Year value as parameters. It is like :
Param_1 = 2014, Param_2 =2015
Measure = CALCULATE(aggregation, FILTER(Fact_Table, RELATED(Dim_Table_1[YEAR]) >= Param1 || RELATED(Dim_Table_2[YEAR]) >= Param2))
Will you guide if the same works in Power BI,If yes how we can achieve this. I am using Direct query to connect to Data Source.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |