We continue the series on the creation of our first Power BI Report - Part 4
* This video continues from where we stop with the creation of our MYMeasures Table, which will hold all the measures we will use in our Power BI Report.
Link: learn.microsof...
Power up Challenge 2024 Walkthrough Series.
1. My Animal Shelter Solution Full Demo - • 1. My Animal Shelter S...
2. Intro - • 2. Animal Shelter Solu...
3. Create and Import Shelter Table in the Dataverse Part 1 (Challenge I) - Remastered - • 3. Create and Import S...
4. Create and Import Foster Family Table in the Dataverse Part 2 (Challenge I) - Remastered - • 4. Create and Import F...
5. Create and Import Animal Table in the Dataverse Part 3 (Challenge I) - Remastered - • 5. Create and Import A...
6. Create a Model Driven App I (Challenge 2) - • 6. Create a Model Driv...
7. Add SVG Icons and Logo (Optional Challenge 2) - • 7. Add SVG Icons and L...
8. Create a Canvas App I (Challenge 3) - • 8. Create a Canvas App...
9. Create a Canvas App II (Challenge 3) - • 9. Create a Canvas App...
10. Create a Power Automate Flow (Challenge 4) - • 10. Create a Power Aut...
11. Create a Business Process Flow for My Model Driven App - • 11. Create a Business ...
12. Create a Custom Page for My Model Driven App I - • 12. Create a Custom Pa...
13. Create a Custom Page for My Model Driven App II - • 13. Create a Custom Pa...
14. Create a Custom Page for My Model Driven App III - • 14. Create a Custom Pa...
15. Create a Power BI Report I (Challenge 5) - • 15. Create a Power BI ...
16. Create a Power BI Report II (Challenge 5) - • 16. Create a Power BI ...
17. Create a Power BI Report III (Challenge 5) - • 17. Create a Power BI ...
18. Create a Power BI Report IV (Challenge 5) - (You are here)
19. Create a Power BI Report V (Challenge 5) - • 19. Create a Power BI ...
20. Final Demo (With all new add on features; BPF, Custom Pages and more)
All Codes: docs.google.co...
Codes:
Total Animals Rescued = COUNTROWS('Animal Info')
Total Animals Fostered =
// Calculate the result with a specific filter context
CALCULATE(
// Count the rows in the 'Animal Info' table
COUNTROWS('Animal Info'),
// Apply a filter to include only rows where 'Animal Date of Foster' is not blank
NOT(ISBLANK('Animal Info'[Animal Date of Foster]))
)
Total Animals Rescued Last Year =
// Calculate the result with a specific filter context
CALCULATE(
// Use the existing measure for total animals rescued
[Total Animals Rescued],
// Apply a time intelligence function to shift the date context to the same period last year
SAMEPERIODLASTYEAR('dimDate'[Date])
)
Total Animals Fostered Last Year =
// Calculate the result with a specific filter context
CALCULATE(
// Use the existing measure for total animals fostered
[Total Animals Fostered],
// Apply a time intelligence function to shift the date context to the same period last year
SAMEPERIODLASTYEAR('dimDate'[Date])
)
........
Most Rescued Animal =
VAR MaxCountAnimalType =
MAXX(
// Step 1: Filter and summarize the 'Animal Info' table to include only rows where 'Date of Arrival' is not blank
FILTER(
SUMMARIZE(
FILTER('Animal Info', NOT(ISBLANK('Animal Info'[Animal Date of Arrival]))), // Filter to non-blank 'Date of Arrival'
'Animal Info'[Animal Type], // Group by 'Animal Type'
"Count", COUNTROWS('Animal Info') // Calculate the count of rows for each 'Animal Type'
),
[Count] = MAXX( // Step 2: Filter by the maximum count of rescues
SUMMARIZE(
FILTER('Animal Info', NOT(ISBLANK('Animal Info'[Animal Date of Arrival]))), // Re-filter for non-blank 'Date of Arrival'
'Animal Info'[Animal Type],
"Count", COUNTROWS('Animal Info')
),
[Count] // Compare counts within the summarized table
)
),
[Animal Type] // Return the 'Animal Type' with the maximum count
)
// Step 3: Return a table with the most rescued animal type
RETURN
SELECTCOLUMNS(
FILTER(
SUMMARIZE(
FILTER('Animal Info', NOT(ISBLANK('Animal Info'[Animal Date of Arrival]))),
'Animal Info'[Animal Type],
"Count", COUNTROWS('Animal Info')
),
[Animal Type] = MaxCountAnimalType // Filter by the 'Animal Type' with the maximum count
),
"Type", [Animal Type] // Select and rename columns to form the result table
)
Негізгі бет 18. Create a Power BI Report IV (Challenge 5)
No video
Пікірлер: 12