Forum Discussion
Help building a calculation or Point me in a Direction
- 1 year ago
Hi jsnrchtr ,
Please provide sample PBIX file and show the expected outcome based on the sample data .
Thanks
In the photo where the gray dashes are, those are the "trend arrow" calculations. The number to the left as it changes, I am wanting the dash to reflect its change. Example: If the previous day was 10, and today it is 9, then I should see a green down arrow. If the number is now 12, I should see a red up arrow. If there is no change, the gray dash should remain. It should reference the previous day's data as the dashboard refreshes.
| lin | NIINMCN | model | serial_number | completion_status | req_compl_end_date | completion_date | update_date |
| E05011 | 011234567 | A | 1 | Completed | 11/9/2024 | 8/14/2024 | 8/14/2024 |
| E05011 | 011234567 | A | 2 | Completed | 7/18/2025 | 2/26/2025 | 2/26/2025 |
| E05011 | 011234567 | A | 3 | Completed | 8/21/2024 | 11/15/2022 | 11/16/2022 |
| E05011 | 011234567 | A | 4 | Completed | 11/9/2024 | 10/3/2024 | 10/3/2024 |
| E05011 | 011234567 | A | 5 | Completed | 7/18/2025 | 4/1/2025 | 4/23/2025 |
| E05011 | 011234567 | A | 6 | Completed | 8/21/2024 | 5/20/2021 | 5/24/2021 |
| E05005 | 013217654 | B | 7 | Completed | 7/18/2025 | 4/2/2025 | 4/2/2025 |
| E05004 | 019874321 | C | 8 | N/A | 2/16/2021 | 2/17/2021 | |
| E05005 | 013217654 | B | 10 | Not Completed | 7/18/2025 | 2/14/2025 | |
| E05004 | 019874321 | C | 11 | Completed | 11/9/2024 | 12/16/2024 | 12/16/2024 |
| E05004 | 019874321 | C | 12 | Completed | 11/9/2024 | 8/26/2024 | 9/4/2024 |
| E05004 | 019874321 | C | 13 | Completed | 11/9/2024 | 11/5/2024 | 11/5/2024 |
| E05004 | 019874321 | C | 14 | Completed | 2/27/2021 | 5/5/2021 | 5/5/2021 |
| E05004 | 019874321 | C | 15 | Completed | 8/21/2024 | 12/13/2021 | 1/25/2022 |
| E05004 | 019874321 | C | 16 | Completed | 11/9/2024 | 10/4/2024 | 10/10/2024 |
| E05004 | 019874321 | C | 17 | N/A | 2/16/2021 | 2/17/2021 | |
| E05004 | 019874321 | C | 18 | Completed | 11/9/2024 | 10/17/2024 | 10/17/2024 |
| E05004 | 019874321 | C | 19 | Completed | 8/21/2024 | 6/8/2021 | 6/8/2021 |
| E05004 | 019874321 | C | 9 | Completed | 8/21/2024 | 6/8/2021 | 6/8/2021 |
- v-dineshya1 year agoCommunity Support
Hi jsnrchtr ,
Thank you for reaching out to the Microsoft Fabric Community forum.Please follow below steps.
1. please do change your code with below things.
Make
sure your 'Date' table is related to 'MMIS Status Update'[update_date].
2. Make sure you are filtering the data by a single date (e.g., today), either by a slicer or a measure logic using TODAY().
3. Current Day KPI Remaining Items
KPI Remaining Items =
CALCULATE(
COUNTROWS('MMIS Status Update'),
'MMIS Status Update'[completion_status] = "Not Completed"
)4. Previous Day KPI Remaining Items
KPI Previous Day Remaining Items =
CALCULATE(
[KPI Remaining Items],
DATEADD('Date'[Date], -1, DAY)
)Note: Make sure 'Date'[Date] is marked as a Date table and has a relationship to 'MMIS Status Update'[update_date].
5.
KPI Remaining Difference = [KPI Remaining Items] - [KPI Previous Day Remaining Items]KPI Trend Arrow =
SWITCH(
TRUE(),
[KPI Remaining Difference] < 0, UNICHAR(11165),
[KPI Remaining Difference] > 0, UNICHAR(11167),
UNICHAR(9644)
)KPI Trend Arrow Color =
SWITCH(
TRUE(),
[KPI Remaining Difference] > 0, "Red",
[KPI Remaining Difference] < 0, "Green",
"Gray"
)If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.- jsnrchtr1 year agoRegular Visitor
I had the formulas recommended above already in place initially... the issue that gave me was when the quantity remaining was 0, it returned [blank] instead of "0". I needed it to say 0 instead.
Can you provide an example how to filter measure logic using today() ? I understand what you're saying, but not sure where to put that reference.
I have a today() calc to determine if the requirement is overdue:
MMIS OVERDUE = IF('MMIS Status Update'[req_compl_end_date].[Date] <=TODAY () , "YES", "NO")I'm not sure how to apply it for the normal calculations.- v-dineshya1 year agoCommunity Support
Hi jsnrchtr ,
Please refer the attached PBIX file for your reference.
If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.