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'm facing an issue when i'm trying to pass a measure as a value in a matrix.
My data is in this format-
I have to show only B and E in my matrix and "X" which is the sum of D and E.
My desired output is-
I tried creating a measure X, which is the sum of measure D and E.
{
D=
var a = CALCULATE(
SUM('Table1'[Value]),
FILTER('Table1','Table1'[Account]="D"))
var b = CALCULATE(SUM('Table1'[Value]),
FILTER('Table1','Table1'[Year]=SELECTEDVALUE('Table1'[Year]) && 'Table1'[Account]="D"))
return
IF(SELECTEDVALUE('Table1'[Comparison])="CoC",a,IF(SELECTEDVALUE('Table1'[Comparison])="YoY",b))
E=
var a = CALCULATE(
SUM('Table1'[Value]),
FILTER('Table1','Table1'[Account]="E"))
var b = CALCULATE(SUM('Table1'[Value]),
FILTER('Table1','Table1'[Year]=SELECTEDVALUE('Table1'[Year]) && 'Table1'[Account]="E"))
return
IF(SELECTEDVALUE('Table1'[Comparison])="CoC",a,IF(SELECTEDVALUE('Table1'[Comparison])="YoY",b))
X=[D]+[E]
}
when i'm trying to pass this measure in Value section of the matrix, it's not showing anything
Matrix data setting:
Rows- Account
Columns- Quarter
Values- X
It's giving a blank matrix as an output. What is the alternative way to show this?
Please note- Data is huge and this is just the sample data to depict the data outline.
Solved! Go to Solution.
@v-yuta-msft No, there's no conflict there. The measure is working fine and when i'm using the measure in the Values section in the matrix, it's not showing any value. There's no error. It's just that no values are being displayed.
@Anonymous ,
Please check if there's any conflict between the conditions in your measure:
'Table1'[Year]=SELECTEDVALUE('Table1'[Year])
'Table1'[Account]="D"
'Table1'[Account]="E"
'Table1'[Comparison])="CoC"
'Table1'[Comparison])="YoY"
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-yuta-msft No, there's no conflict there. The measure is working fine and when i'm using the measure in the Values section in the matrix, it's not showing any value. There's no error. It's just that no values are being displayed.
@Anonymous
Apologies upfront since this is stating the obvious...do you have either "CoC" or "YoY" selected as per your IF clauses in the RETURN expressions in both measrues D & E? If not I suspect that is why you are getting blanks
Proud to be a Super User!
Paul on Linkedin.
@Anonymous ,
Could you please share a simple sample table(need raw data, not the matrix visual) so that I could do further test?
Regards,
Jimmy Tao
@Anonymous
Sorry, did you actually include a sample of your data structure? or is it in the structure as seen in you screenshot?
Proud to be a Super User!
Paul on Linkedin.
@PaulDBrown Yes, I have attached a sample data structure similar to the original one. I can't share the original one due to privacy policies.
The desired output which i want is-
A (which is directly coming from Data column Account)
C (which is directly coming from Data column Account)
X (measure which shows the sum of D and E)
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |