Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
15 | |
11 | |
8 | |
8 |
User | Count |
---|---|
19 | |
15 | |
15 | |
14 | |
13 |