Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi - I have 2 tables... Table A and Table B.
I want to find the percentage of the grand total from a field in Table A let's call it "Class". Class has 3 options "1, 2, or 3".
Table B has the actual dollar amounts let's call it "sum total value" that relate to table based on a common field.
I know about the calculate function, but I'm not sure how to do this formula since the data is coming from 2 tables.
I have the following so far:
Hi @Anonymous ,
“I want to find the percentage of the grand total from a field in Table A let's call it "Class". Class has 3 options "1, 2, or 3".”
“Table B has the actual dollar amounts let's call it "sum total value" that relate to table based on a common field.”
I’m not sure what’s your data model.
Which column do the two tables use to connect with each other?
Is the [Sum total value] column a DAX column?
Is it like this?
I had created such a measure and add it into a card:
Percentage1 =
DIVIDE(
SUMX(
FILTER(
TableB,
TableB[Class] = 1
),
RELATED(TableA[Sum total value])
),
SUM(TableA[Sum total value])
)
Or you can do like this:
Measure =
IF(
ISFILTERED(TableB[Class]),
DIVIDE(
SUM(TableA[Sum total value]),
SUMX(
ALLEXCEPT(
TableB,
TableB[Class]
),
RELATED(TableA[Sum total value])
)
),
BLANK()
)
If they’re not what you want, please give me a sample data model, and tell me what visualization do you ultimately want to achieve.
If it is sloved, could you kindly accept it as a solution to close this case?
If not, please let me know.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |