Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi guys,
Please need your help in this topic.
I have a star schema with classic sales/cost/volume values as a fact table and some other dimension table with product, time, country, ecc.
I have created starting from this dataset a table with the below formula:
Solved! Go to Solution.
Try
Tabella =
ADDCOLUMNS (
SUMMARIZE (
'Fact Table',
Dim_Date[FP Month Number],
Dim_Country[Country],
FactTable[Customer N],
FactTable[Customer],
FactTable[P&L Line ],
FactTable[Material N],
Dim_Material[Material Desc]
),
"FY2022 Revenue", CALCULATE ( [Revenue], Dim_Date[Fiscal Year] = "FY2022" ),
"FY2023 Revenue", CALCULATE ( [Revenue], Dim_Date[Fiscal Year] = "FY2023" ),
"FY2022 Quantity", CALCULATE ( [Volume], Dim_Date[Fiscal Year] = "FY2022" ),
"FY2023 Quantity", CALCULATE ( [Volume], Dim_Date[Fiscal Year] = "FY2023" ),
"FY2022 COGS", CALCULATE ( SUM ( ICMI[COGS] ), Dim_Date[Fiscal Year] = "FY2022" ),
"FY2023 COGS", CALCULATE ( SUM ( ICMI[COGS] ), Dim_Date[Fiscal Year] = "FY2023" )
)
Try
Tabella =
ADDCOLUMNS (
SUMMARIZE (
'Fact Table',
Dim_Date[FP Month Number],
Dim_Country[Country],
FactTable[Customer N],
FactTable[Customer],
FactTable[P&L Line ],
FactTable[Material N],
Dim_Material[Material Desc]
),
"FY2022 Revenue", CALCULATE ( [Revenue], Dim_Date[Fiscal Year] = "FY2022" ),
"FY2023 Revenue", CALCULATE ( [Revenue], Dim_Date[Fiscal Year] = "FY2023" ),
"FY2022 Quantity", CALCULATE ( [Volume], Dim_Date[Fiscal Year] = "FY2022" ),
"FY2023 Quantity", CALCULATE ( [Volume], Dim_Date[Fiscal Year] = "FY2023" ),
"FY2022 COGS", CALCULATE ( SUM ( ICMI[COGS] ), Dim_Date[Fiscal Year] = "FY2022" ),
"FY2023 COGS", CALCULATE ( SUM ( ICMI[COGS] ), Dim_Date[Fiscal Year] = "FY2023" )
)
can you share a screenshot of the dataview for my code please, I want to see what the raw table looks like.
It was working, my mistake. Thank you
ES
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
109 | |
100 | |
39 | |
31 |