Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
Can you please help me with below query
I am preparing a weekly status report of the projects for a particular week end.We have different parameters like schedule,effort staffing and based on these parameters ,projects managers will update the status as red,yellow,green.
I have written a measure to get the total count of projects which falls under red,yellow,green status for the respective parameters
My query is how can I put an indicator(up arrow,down arrow)in front of the above count measure.
My matrix should look like below
Schedule Effort Staffing
----------------------------------------------------------------------
red [indicator] 9 [indicator] 7 [indicator] 3
yellow [indicator] 3 [indicator] 3 [indicator] 9
---------------------------------------------------------------------------
there is a condition to these indicators,suppose my previous week count is less than current week then down arrow should appear
example:previous week total 12 projects were in red status for Schedule parameter and current if it shows 11,then down arrow indicator should pop up.
Note:status,parameters and report date(week ending date is saturday)in 3 different tables
Please help
Solved! Go to Solution.
You want to show an indicator (either up arrow or down arrow) based on the comparison between the current week's count and the previous week's count for each status and parameter.
To achieve this, you'll first need to calculate the difference between the current week's count and the previous week's count for each status and parameter. Then, based on this difference, you can determine which indicator to show.
Here's how you can do it:
First, create a measure to calculate the difference between the current week's count and the previous week's count. Let's call this measure Difference. You can use the CALCULATE and DATEADD functions to get the count for the previous week:
Difference =
VAR CurrentWeekCount = [YourCountMeasure]
VAR PreviousWeekCount = CALCULATE([YourCountMeasure], DATEADD('DateTable'[Date], -7, DAY))
RETURN CurrentWeekCount - PreviousWeekCount
Now, based on the Difference measure, you can create another measure to determine the indicator:
Indicator =
IF([Difference] > 0, "↑", IF([Difference] < 0, "↓", " "))
This measure will return an up arrow if the difference is positive (meaning the current week's count is greater than the previous week's count), a down arrow if the difference is negative, and a space if there's no difference.
Finally, in your matrix visual, you can display the Indicator measure next to your count measure for each status and parameter. You might need to adjust the formatting to make sure the indicator and the count are displayed properly next to each other.
Remember, the key here is to make sure your date table is correctly set up and that you have relationships established between your date table and the tables containing the status and parameters. This will ensure that the DAX calculations are accurate.
You want to show an indicator (either up arrow or down arrow) based on the comparison between the current week's count and the previous week's count for each status and parameter.
To achieve this, you'll first need to calculate the difference between the current week's count and the previous week's count for each status and parameter. Then, based on this difference, you can determine which indicator to show.
Here's how you can do it:
First, create a measure to calculate the difference between the current week's count and the previous week's count. Let's call this measure Difference. You can use the CALCULATE and DATEADD functions to get the count for the previous week:
Difference =
VAR CurrentWeekCount = [YourCountMeasure]
VAR PreviousWeekCount = CALCULATE([YourCountMeasure], DATEADD('DateTable'[Date], -7, DAY))
RETURN CurrentWeekCount - PreviousWeekCount
Now, based on the Difference measure, you can create another measure to determine the indicator:
Indicator =
IF([Difference] > 0, "↑", IF([Difference] < 0, "↓", " "))
This measure will return an up arrow if the difference is positive (meaning the current week's count is greater than the previous week's count), a down arrow if the difference is negative, and a space if there's no difference.
Finally, in your matrix visual, you can display the Indicator measure next to your count measure for each status and parameter. You might need to adjust the formatting to make sure the indicator and the count are displayed properly next to each other.
Remember, the key here is to make sure your date table is correctly set up and that you have relationships established between your date table and the tables containing the status and parameters. This will ensure that the DAX calculations are accurate.
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
27 | |
12 | |
11 | |
10 | |
6 |