Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi All,
I need help with the DAX formula for the below scenario.. please check
Below is the table i am using and MTD ,QTD and YTD are measures. the formula used for MTD is as below as i want to calculate the numbers by filter by just benchmark_code column
Now the user wants to remove the Code Column and calculate all the measures.. when i remove the code column from the Table the values are getting wrong.is there a way to remove Code Column from the table and still use the same formula as mentioned above? please help
Solved! Go to Solution.
@ak77 , Try this version
BM_MTD =
CALCULATE(
[Total BM Return],
DATESMTD('Date Table'[_Date]),filter ( all(Broad_Market_Indices_Data),Broad_Market_Indices_Data[benchmark_code] = max(Broad_Market_Indices_Data[benchmark_code]) )
)
and is benchmark_code is same as the code; try to have that in a separate dimension and use that in code
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Date date should be marked as date table and join should single direction
Make sure this code alone is working
BM_MTD =
CALCULATE(
[Total BM Return],
DATESMTD('Date Table'[_Date]) )
Hi,
In your measure, replace benchmark_code with benchmark_name.
@Ashish_Mathur , Thanks for reply ...i want to calculate using code as name is changing for a particular code after a certain period
@amitchandak , Thanks for reply, i am trying ur DAX.wil get back to u
Thanks again guys
@ak77 , Try this version
BM_MTD =
CALCULATE(
[Total BM Return],
DATESMTD('Date Table'[_Date]),filter ( all(Broad_Market_Indices_Data),Broad_Market_Indices_Data[benchmark_code] = max(Broad_Market_Indices_Data[benchmark_code]) )
)
and is benchmark_code is same as the code; try to have that in a separate dimension and use that in code
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Date date should be marked as date table and join should single direction
Make sure this code alone is working
BM_MTD =
CALCULATE(
[Total BM Return],
DATESMTD('Date Table'[_Date]) )
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 43 | |
| 38 | |
| 35 | |
| 21 | |
| 15 |
| User | Count |
|---|---|
| 65 | |
| 58 | |
| 28 | |
| 27 | |
| 25 |