Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
by using matrix table i want to display last week =0 and this week i want to display data
Hi, @tkavitha911
Could you please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It is better if you can share a simplified pbix file. Thank you.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @tkavitha911
I am glad to help you.
May I ask what your specific semantic model looks like?
Since you didn't give specific test data, I assumed some data based on your description:
Then optimized your DAX a bit:
ThisWeek_non_duty_paid =
VAR MaxWeekNum =
MAXX ( ALL ( 'FilteredTable' ), 'FilteredTable'[week_num] )
VAR ThisWeeknon_dutypaid =
CALCULATE (
SUM ( 'FilteredTable'[USD Non Duty Paid] ),
'FilteredTable'[week_num] = MaxWeekNum
)
VAR Div = 2
VAR Result =
DIVIDE ( ThisWeeknon_dutypaid, Div )
RETURN
IF ( MAX ( 'FilteredTable'[week_num] ) = MaxWeekNum, Result, 0 )
Here is my test results:
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |