The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi, I'm trying to add 2 totals to a matrix
I want it to be something like this:
**the value inside the matrix is counted for each step base on the categories (reason)
** the new total is based on a measure and it sums the money, I don't want the value to appear in the rows
I only want to add the total sum of this measure under the grand total (under the count total)
reason/steps | step1 | step2 | step3 | step4 | step5 |
aa | 30 | 20 | 10 | 5 | 1 |
baaa | 45 | 25 | 25 | 12 | 8 |
csd | 10 | 0 | 0 | 0 | 0 |
total | 85 | 45 | 35 | 17 | 9 |
new total | 1555$ | 4845$ | 110$ | 155$ | 151$ |
Solved! Go to Solution.
Hi @ReutAtias12
You can create a disconnected table that contains all reasons + "Total" let's call it 'SlicerReason'. Then you can place SlicerReaon[Reson] in the rows of the matrix and the following measure in values of the matrix
ResultMeasure =
IF (
HASONEVALUE ( ReasonSlicer[Reason] ),
SUMX (
VALUES ( ReasonSlicer[Reason] ),
IF (
ReasonSlicer[Reason] = "Total",
[CountMeasure],
CALCULATE ( [CountMeasure], 'Table'[Reason] = ReasonSlicer[Reason] )
)
),
[MoneySumMeasure]
)
Hi @ReutAtias12
You can create a disconnected table that contains all reasons + "Total" let's call it 'SlicerReason'. Then you can place SlicerReaon[Reson] in the rows of the matrix and the following measure in values of the matrix
ResultMeasure =
IF (
HASONEVALUE ( ReasonSlicer[Reason] ),
SUMX (
VALUES ( ReasonSlicer[Reason] ),
IF (
ReasonSlicer[Reason] = "Total",
[CountMeasure],
CALCULATE ( [CountMeasure], 'Table'[Reason] = ReasonSlicer[Reason] )
)
),
[MoneySumMeasure]
)
Thanks!
@ReutAtias12 You could potentially adapt this approach. The New Hotness (Custom Matrix Hierarchy) - Microsoft Power BI Community
Another potentially approach would be Deneb
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |