Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi Masters,
I want to colour W38 to show which week we are like below.
Is it possible? any advice would be much appreciated.
thank you,
CL
Solved! Go to Solution.
@Anonymous Oh, wait, syntax error, missing )
Measure =
VAR __Date = MAX('Table'[Date])
RETURN
IF(WEEKNUM(__Date) = WEEKNUM(TODAY()) && YEAR(__Date) = YEAR(TODAY()),1,BLANK())
@Anonymous I don't see where you can set the color of a line based on a formula yet. So like:
Measure = IF(WEEKNUM(MAX('Table'[Date]))=WEEKNUM(TODAY()),1,BLANK())
X axis in the graph, there are Weeks,
2020-21, 2020-22, 2020-23, 2020-24 . . . . .
i want to colour 2020-38.
@Anonymous Right, still no conditional formatting for that. You could add a new line that only displays on the current week, so that it shows as a dot and set it to a value of 1 perhaps. Then that would indicate current week.
@Greg_Deckler, That's a good idea!
can you let me know what i should do if i'd like to have the line?
thanks,
CL
@Anonymous Thinking:
Measure = IF(WEEKNUM(MAX('Table'[Date]))=WEEKNUM(TODAY()),1,BLANK())
@Anonymous Hah!, didn't think about that! OK, that's easy to fix:
Measure =
VAR __Date = MAX('Table'[Date])
RETURN
IF(WEEKNUM(__Date) = WEEKNUM(TODAY() && YEAR(__Date) = YEAR(TODAY()),1,BLANK())
Hi @Greg_Deckler thanks for your reply.
I honestly have no idea of this dax..
this time, it didn't appear?
@Anonymous Oh, wait, syntax error, missing )
Measure =
VAR __Date = MAX('Table'[Date])
RETURN
IF(WEEKNUM(__Date) = WEEKNUM(TODAY()) && YEAR(__Date) = YEAR(TODAY()),1,BLANK())
@Greg_Deckler oh.. that's too bad.... okay thank you so much for your help in anyways! 🙂
@Anonymous Sorry we couldn't get there completely in the end, but if this at least gets you something, mark it as an answer so others can benefit! 🙂
@Anonymous Hmm, so Calendar[Date] is used in you x-axis?
@Anonymous I think it was a syntax error on my part, corrected below.
Measure =
VAR __Date = MAX('Table'[Date])
RETURN
IF(WEEKNUM(__Date) = WEEKNUM(TODAY()) && YEAR(__Date) = YEAR(TODAY()),1,BLANK())
@Anonymous Unfortunately no, haven't found a way to draw vertical lines on line charts yet. The Analytics pane only allows horizontal lines. Unless...you want to create a bunch of those measures, each with a different value that is returned, so think 10 of those measures that return values from 1 to 10 each, then they would show up stacked vertically on the graph. Maybe create one for every 2000? 😞
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 73 | |
| 70 | |
| 39 | |
| 34 | |
| 23 |