Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |