Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi All
I Have below expression work fine , it return correct amount :-
SUM_YTD = SUMX('_PNL_Table','_PNL_Table'[Switch_YTD]).
But below expression display Null :-
Switch_YTD = SWITCH(SELECTEDVALUE('_PNL_Table'[REV&COGS]),
"COGS",[_YTD COGS],
"REV", [_YTD REV],
"OTH", [_YTD OTH],
"EXP", [_YTD EXP]
)
Can some one share with me where go wrong ?
Paul
Hi All
Below is my PBI sample file
Paul
hi @admin11 - The measure will calculate based on a particular value of GL type (COGS, EXP, OTH, REV) - hence you will have to add a slicer into your report for the same. Please see screenshot below for reference.
Attached is the updated pbix file.
Please mark the post as a solution and provide a 👍 if my comment helped with solving your issue.
Thanks!
Sumanth
Proud to be a Super User!
When i click Step 2 , it select year = 2020 , Table 2 YTD expression display value is correct.
When i click Step 1 , it select year = 2019 , Table 2 YTD expression display null. But Table 1 display there are value.
Below is my PBI file :-
https://www.dropbox.com/s/22lziixb1kx8nf2/APPEND%202%20GL%20INTO%201%20V006.pbix?dl=0
Paul Yeo
@admin11 , This seems like issue the way X function behaves
I tried
Measure = SELECTEDVALUE('_PNL_Table'[REV&COGS]) value is null when nothing is selected
then I tried
Measure = SUMX('_PNL_Table',[Measure] ), I am getting values
Then I tried
SUM_YTD = SUMX('_PNL_Table',SWITCH(SELECTEDVALUE('_PNL_Table'[REV&COGS]),
"COGS",[_YTD COGS],
"REV", [_YTD REV],
"OTH", [_YTD OTH],
"EXP", [_YTD EXP]
))
This gives null like Switch_YTD
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 53 | |
| 42 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 121 | |
| 103 | |
| 46 | |
| 30 | |
| 24 |