Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anton-G
Helper I
Helper I

Add multiple values in measure

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.limit value (red line) in a line and stacked column chart.png

8 REPLIES 8
Greg_Deckler
Super User
Super User

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


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

 

WeekLimitCounts
152
253
351
454
555
652
753
852
953
10106
11108
121011
13108
14107
15106
1652
1753
1851
1953
2052

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.

Add_multiple_values_in_measure

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yes

 

Screenshot that shows what I can add.

Screenshot that shows what I can add.png

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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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:
Week_Error.png

 

A table showing week numbers from the same place I use in the question.

Year_Week_Table.png

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.