The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have this measure:
VAR V1=
ADDCOLUMNS(
VALUES (Fact[Key_Customer] ),
"C1",
CALCULATE([RevenueYTD],SAMEPERIODLASTYEAR('Date'[Date]),REMOVEFILTERS(Fact[Segment],Fact[Type])
)
)
RETURN SUMX(V1, [C1])
And I wanted to change it to:
VAR V1=
ADDCOLUMNS(
VALUES (Customer[Key_Customer] ),
"C1",
CALCULATE([RevenueYTD],SAMEPERIODLASTYEAR('Date'[Date]),REMOVEFILTERS(Fact[Segment],Fact[Type])
)
)
RETURN SUMX(V1, [C1])
But returns wrong totals, why is this? What difference does it make? Customer[Key_Customer] and Fact[Key_Customer] are the same…
To give some context:
(In the Customers table I have Customers with the exact same names, but different Key_Customer, they are in fact different customers, they just happen to have the same name).
My problem is that I have a Filter in the report as: Customer[Name]… and Power BI groups by name, ignoring the Key.
My goal is to change the code to have: VALUES (Customer[Key_Customer] )
@Anonymous , Plot the first with Fact Key_customer
and second, one customer Key_customer, are you still seeing the same diff?
Make sure customer as all the customer in fact.
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |