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
I have the following problem:
I have calculated a dynamic measure index:
and the moving average with the following function:
Tabelle1[Werte] are the values for moving average
I cannot create a plot Moving mean as a function of dynamic index. Where is the error?
@Anonymous , Can please explain the logic here
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
refer if this can help
| Faktor 1 | Faktor 2 | Wert | Index | Moving Average Test |
| A | B | 1 | 1 | 0.1 |
| B | A | 4 | 2 | 0.5 |
| B | A | 6 | 3 | 1.1 |
| A | B | 7 | 4 | 1.8 |
| B | B | 3 | 5 | 2.1 |
| A | A | 2 | 6 | 2.3 |
| B | B | 1 | 7 | 2.4 |
| B | B | 5 | 8 | 2.9 |
| B | A | 8 | 9 | 3.7 |
HI @Anonymous,
Did you mean the 'window A' part should be replaced with the current selection from the filter?
If that is the case, you can create an unrelated table for all needed selection values and not have a relationship to the current table.
Then you can use the Dax function to get sections from the filter/slicer to interact with current expressions.
formula =
VAR Window_A =
MAX ( NewTable[Value] )
VAR myResult =
CALCULATE (
SUM ( Tabelle1[Wert] ),
FILTER (
ALLSELECTED ( Tabelle1 ),
Tabelle1[Index_Measur 2] > Tabelle1[Index_Measur 2] - Window_A
&& Tabelle1[Index_Measur 2] <= Tabelle1[Index_Measur 2]
)
)
RETURN
CONVERT ( myResult / Window_A, DOUBLE )
Regards,
Xiaoxin Sheng
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.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 12 | |
| 9 | |
| 5 | |
| 5 |