Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Need to create a measure to get a fixed limit value (red line) in a line and stacked column chart.
Have week number that I need to create a relationship to.
Connects to SQL Server Analysis Services Database.
Suggestions for DAX question?
Attach an image to illustrate what I'm trying to create.
Perhaps give us a hint on how to calculate Limit?
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Forget the word "fixed" value has updated the original question.
Here's a more clarification of what I'm looking for.
Have week number
Have Counts
Need to add limit, limit is a fixed value that will always be the same between years. I think I need to create a dax to add it, to get it before, I've used "red = 5" but do not know how to get a variation.
Week | Limit | Counts |
1 | 5 | 2 |
2 | 5 | 3 |
3 | 5 | 1 |
4 | 5 | 4 |
5 | 5 | 5 |
6 | 5 | 2 |
7 | 5 | 3 |
8 | 5 | 2 |
9 | 5 | 3 |
10 | 10 | 6 |
11 | 10 | 8 |
12 | 10 | 11 |
13 | 10 | 8 |
14 | 10 | 7 |
15 | 10 | 6 |
16 | 5 | 2 |
17 | 5 | 3 |
18 | 5 | 1 |
19 | 5 | 3 |
20 | 5 | 2 |
Hi @Anton-G,
For one year only has one week and the week is unique in the X-axis, I would suggest you add the column in the Values and take the average of them.
Best Regards,
Dale
Because I connect to a SQL Server Analysis Services Database I do not have the ability to add a column.
Hi @Anton-G,
Is it a live connection?
Best Regards,
Dale
Yes
Screenshot that shows what I can add.
Hi @Anton-G,
Since you can add measures, you can try it like below then add it in the line.
Measure = IF ( MIN ( 'Date'[Week Number of Year] ) <= 9, 5, IF ( MIN ( 'Date'[Week Number of Year] ) <= 15, 10, 5 ) )
Best Regards,
Dale
Have tried some variations of the question.
Receiving an error when I try.
My question:
Measure =
IF (
MIN ( 'DIM-Calendar'[Week] ) <= 9,
5,
IF ( MIN ( 'DIM-Calendar'[Week] ) <= 15, 10, 5 )
)
Error:
A table showing week numbers from the same place I use in the question.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |