Forum Discussion
GENERATESERIES by boundaries
- 1 year ago
Hi forum,
I found a solution now for my specific case:Mapp_Populated_Account_Series =
GENERATE (
SELECTCOLUMNS (
'Dim_SKR4_Account_Group',
"Account lower boundary", Dim_SKR4_Account_Group[KontoNrUntergrenze],
"Account upper boundary", Dim_SKR4_Account_Group[KontoNrObergrenze]
),
GENERATESERIES (
[Account lower boundary],
[Account upper boundary],
1
)
)
When you use GENERATESERIES, attention is to be paid in case you want to rename columns withing this code. DAX can easily loose the context here.
To avoid errors, the code is to be written as for the column “test” in case of renaming.Mapp_Populated_Account_Series =
GENERATE (
SELECTCOLUMNS (
'Dim_SKR4_Account_Group',
"test", Dim_SKR4_Account_Group[KontoNrUntergrenze],
[KontoNrObergrenze]
),
GENERATESERIES (
[test],
'Dim_SKR4_Account_Group'[KontoNrObergrenze],
1
)
)
)
To avoid problems, I recommend to rename already in PQ.
Hi forum,
I found a solution now for my specific case:
Mapp_Populated_Account_Series =
GENERATE (
SELECTCOLUMNS (
'Dim_SKR4_Account_Group',
"Account lower boundary", Dim_SKR4_Account_Group[KontoNrUntergrenze],
"Account upper boundary", Dim_SKR4_Account_Group[KontoNrObergrenze]
),
GENERATESERIES (
[Account lower boundary],
[Account upper boundary],
1
)
)
When you use GENERATESERIES, attention is to be paid in case you want to rename columns withing this code. DAX can easily loose the context here.
To avoid errors, the code is to be written as for the column “test” in case of renaming.
Mapp_Populated_Account_Series =
GENERATE (
SELECTCOLUMNS (
'Dim_SKR4_Account_Group',
"test", Dim_SKR4_Account_Group[KontoNrUntergrenze],
[KontoNrObergrenze]
),
GENERATESERIES (
[test],
'Dim_SKR4_Account_Group'[KontoNrObergrenze],
1
)
)
)
To avoid problems, I recommend to rename already in PQ.