March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
14 | |
11 | |
8 | |
5 |
User | Count |
---|---|
26 | |
21 | |
20 | |
14 | |
10 |