March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
My sales data are from SQL database and my weight data are from Excel spreadesheet.
This is my model diagram:
Now I want to calculate my sales by weight. So I am looking for some fomular like this:
Sales/Weight
This has to be filtered by hierarchy.
I tried this DAX measure:
Weight =
VAR catW = SELECTEDVALUE(weight[catgory])
VAR deptW = SELECTEDVALUE(weight[subdept])
VAR catS = SELECTEDVALUE(CAT_TAB[categoryDesc])
VAR deptS = SELECTEDVALUE(SDP_TAB[DepartmentDesc])
RETURN
IF(catW=catS && deptW=deptS,SUMX(weight,weight[weight],0))
The weight only return a total aggregation of weight, it doesn't break down by hierarchy. Thus I can't use this weight to divide my sales.
What is my issue? Can anyone help me on this?
Thanks.
@az38 Thanks for the adivse.
I found if I add the department and category from weight into the visulazation table, I can break down weight correctly.
I think my following question would be: is there any workaround for use my sales hierarchy to break down my weight data?
Here is what I have now:
I am expecting use the hierarchy of weight to break down the sales OR use the hierarchy of sales to break down the weight.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
14 | |
11 | |
8 | |
5 |
User | Count |
---|---|
26 | |
21 | |
20 | |
14 | |
10 |