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 all,
I was wondering ig you could help me with the following issue:
I currently have 3 datasets:
a. Source
ID | Weight |
1001 | 1 |
1002 | 2 |
1003 | 3 |
b. abc
ID | # | Answer |
1001 | 1 | Blue |
1001 | 2 | Beans |
1002 | 1 | Red |
1002 | 2 | Peppers |
1003 | 1 | Blue |
1003 | 2 | Beans |
c. DEF
ID | Type | SEG |
1001 | Gender | Male |
1002 | Gender | Male |
1003 | Gender | Female |
1001 | Country | USA |
1002 | Country | Canada |
1003 | Country | Usa |
I can create a relationship between 'Source & def' and 'Source & abc'. (One a one to many relationship.)
I could have a relationship between 'Segment & abc' but it would be a many to many relationship and I am trying to avoid this type of relationship.
Here is the issue.
I am trying to run calculations, applying a filter from 'Segments' on the 'abc' dataframe, using a sum from the Source table.
Since, it doesnt have a relationship (cde and abc), it cant calculate correctly
How can i properly calculate this?
Thanks in advance for taking the time to look into this matter
Solved! Go to Solution.
Hi, @carlochecchia
I am not sure how the below measure will influence your real case, but if your objective is to achieve the result that is shown in your picture, please try the below.
measurefix =
CALCULATE (
SUM ( Source[Weight] ),
CROSSFILTER ( Source[ID], Questions[ID], BOTH ),
CROSSFILTER ( Source[ID], Segment[ID], BOTH )
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: https://www.linkedin.com/in/jihwankim1975/
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you so much!
Could you also assist me on how to calculate the percentage of the column total?
Looking to achieve this result
Answer Female Male Total
blue 100% 33% 67%
Red -- 66% 33%
total 100% 100% 100%
Hi,
Please try the below.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @carlochecchia
I am not sure how the below measure will influence your real case, but if your objective is to achieve the result that is shown in your picture, please try the below.
measurefix =
CALCULATE (
SUM ( Source[Weight] ),
CROSSFILTER ( Source[ID], Questions[ID], BOTH ),
CROSSFILTER ( Source[ID], Segment[ID], BOTH )
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: https://www.linkedin.com/in/jihwankim1975/
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you once again!
I have one last question, if possible.
Still taking in account the same scenario, but adding a 'Date' Column to the Source dataframe:
ID Weight Date
1001 1 01/01/21
1002 2 01/02/21
1003 3 01/03/21
Would it be possibe to calculate the accumulated weight by month, so it gives the following result:
--01/01/2021 01/02/2021 01/03/2021 total
blue 1 1 4 4
red - 2 2 2
total 1 3 6 6
Hi, @carlochecchia
Please try the below.
Cumulate Weight =
CALCULATE (
SUM ( Source[Weight] ),
CROSSFILTER ( Questions[ID], Source[ID], BOTH ),
CROSSFILTER ( Segment[ID], Source[ID], BOTH ),
FILTER ( ALLSELECTED ( Source ), Source[Date] <= MAX ( Source[Date] ) )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |