Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
I am trying to build a string every time I make a selectiong from a filter I added from a table I added see the table below
The month the month that is selected in the filter must return the previous month string
e.g If the selected value is May the string must return APRFCST
If the selected value is Jun the string must return MAYFCST
If the selected value is Jul the string must return JULFCST
| Month Num | Month Short |
| Apr | 1 |
| May | 2 |
| Jun | 3 |
| Jul | 4 |
| Aug | 5 |
| Sep | 6 |
| Oct | 4 |
| Nov | 8 |
| Dec | 9 |
Solved! Go to Solution.
Hi @Anonymous,
Create slicer table as:
Slicer =
VALUES('Table'[Month Num])
Create column as:
Column =
CALCULATE(
MAX('Table'[Month Num]),
FILTER(
'Table',
'Table'[Month Short]=EARLIER('Table'[Month Short])-1
)
)
Create measure as:
Measure =
var _month=
CALCULATE(
MAX('Table'[Column]),
FILTER(
'Table',
'Table'[Month Num]=ALLSELECTED(Slicer[Month Num])
)
)
return
CONCATENATE(_month,"FCST")
Here is the output:
The demo is attached, please try it.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hi @Anonymous,
Create slicer table as:
Slicer =
VALUES('Table'[Month Num])
Create column as:
Column =
CALCULATE(
MAX('Table'[Month Num]),
FILTER(
'Table',
'Table'[Month Short]=EARLIER('Table'[Month Short])-1
)
)
Create measure as:
Measure =
var _month=
CALCULATE(
MAX('Table'[Column]),
FILTER(
'Table',
'Table'[Month Num]=ALLSELECTED(Slicer[Month Num])
)
)
return
CONCATENATE(_month,"FCST")
Here is the output:
The demo is attached, please try it.
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
The below is what I am trying to achieve:
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.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |