The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi there!
I want to display using the card visual the recent value from my table (an excerpt from the original table), the recent % diff, which in this case is 0.29. And will remain so and will not be affected by the slicer until there is another value inputted under "Submitted" that will give another value for %diff. I can't seem to make this happen with lastdate and max function. Is there a DAX that will make this be possible?
Thanks and best regards.
Date | Submitted | % from total | % running total | Current % total | Previous % total | % diff |
Oct 07 | 6 | 0.44% | 47.8070% | 47.81 | 47.37 | 0.44 |
Oct 08 | 47.81 | 47.81 | 0.00 | |||
Oct 09 | 47.81 | 47.81 | 0.00 | |||
Oct 10 | 47.81 | 47.81 | 0.00 | |||
Oct 11 | 47.81 | 47.81 | 0.00 | |||
Oct 12 | 47.81 | 47.81 | 0.00 | |||
Oct 13 | 9 | 0.66% | 48.4649% | 48.46 | 47.81 | 0.66 |
Oct 14 | 4 | 0.29% | 48.7573% | 48.76 | 48.46 | 0.29 |
Solved! Go to Solution.
Hello @NewUser1989,
Can you please try this:
1. Find the most recent date with a 'Submitted' value
LastSubmittedDate =
LASTNONBLANK(
'YourTableName'[Date],
'YourTableName'[Submitted]
)
2. Retrieve the '% diff' for the latest 'Submitted' date
Recent % Diff =
VAR LastDate = [LastSubmittedDate]
RETURN
IF(
ISBLANK(LastDate),
BLANK(),
CALCULATE(
MAX('YourTableName'[% diff]),
FILTER(
'YourTableName',
'YourTableName'[Date] = LastDate
)
)
)
Once you have the "Recent % Diff" measure, drag it into a card visual to display the most recent "% diff" value. Should you require my further assistance, please do not hesitate to reach out to me.
Hello @NewUser1989,
Can you please try this:
1. Find the most recent date with a 'Submitted' value
LastSubmittedDate =
LASTNONBLANK(
'YourTableName'[Date],
'YourTableName'[Submitted]
)
2. Retrieve the '% diff' for the latest 'Submitted' date
Recent % Diff =
VAR LastDate = [LastSubmittedDate]
RETURN
IF(
ISBLANK(LastDate),
BLANK(),
CALCULATE(
MAX('YourTableName'[% diff]),
FILTER(
'YourTableName',
'YourTableName'[Date] = LastDate
)
)
)
Once you have the "Recent % Diff" measure, drag it into a card visual to display the most recent "% diff" value. Should you require my further assistance, please do not hesitate to reach out to me.
User | Count |
---|---|
56 | |
54 | |
53 | |
47 | |
30 |
User | Count |
---|---|
173 | |
89 | |
70 | |
46 | |
45 |