The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have 2 field parameters that filters a visual like below:
The one field parameter acts as a main and other acts as sub.
Main will have only 2 buttons one for target and another for budget.
But sub will have 3 buttons such as Carbon, Units and Cost.
Their relationships are as below:
Now the issue is, when i press the carbon button, it is not displaying any values in the visual as below:
The Actual measure(Show values) that holds this carbon measure as shown below is:
But Actual Units and Actual Cost are showing values as below:
Actual Units:
Actual Cost
Please help me resolve this
PFA file here Portfolio 6 latest (2) - Copy.pbix
Please let me know if you need further info!
Thanks in advance!
@marcorusso @amitchandak @Ahmedx @Greg_Deckler @Anonymous
Solved! Go to Solution.
I see the problem.
You're slicing by the field "Category Main" {budget, target}, but Carbon in the Parameter tables have no "category main".
Thus, you're filtering "carbon" out.
You won't even see "carbon' in [actual], because "Category Main" filters your "Parameter 2" table.
If you're going to slice by "category main', you can't leave that field empty in your parameter tables for "carbon".
It's hard for me to offer a fix because the logic is a little hard to follow, but this is the problem.
I see the problem.
You're slicing by the field "Category Main" {budget, target}, but Carbon in the Parameter tables have no "category main".
Thus, you're filtering "carbon" out.
You won't even see "carbon' in [actual], because "Category Main" filters your "Parameter 2" table.
If you're going to slice by "category main', you can't leave that field empty in your parameter tables for "carbon".
It's hard for me to offer a fix because the logic is a little hard to follow, but this is the problem.
Hi @rbriga ,
Thanks fo your hint!
I have found a solution for this and close this query by accepting your hint as solution
I can't download the .pbix file because of my company's policy, so I'll need more info.
Hi @rbriga ,
Thanks for your quick response!
Below is the carbon measure used
Is there any issue with relationship here as they are related tables?
Please let me know if you need further info!
Selecting the value of a field parameter may require something other than SELECTEDVALUE().
Following this SQLBI article , try this pattern:
1 VAR __SelectedValue =
2 SELECTCOLUMNS (
3 SUMMARIZE ( Parameter, Parameter[Parameter], Parameter[Parameter Fields] ),
4 "Row",Parameter[Parameter]
5 )
6 RETURN IF ( COUNTROWS ( __SelectedValue ), __SelectedValue )
This will replace your SELECTEDPARAMETER variable.
Hi @rbriga ,
Thanks for your quick response!
I tried implementing by replacing my var with above solution you provided but still its not showing carbon
Thanks in advance!
@Ahmedx @marcorusso @amitchandak