Forum Discussion
Add datarows using parameters in Power BI
- Anonymous1 year ago
Hi ShejalTiwari ,
According to your description, adding a column to an already fixed matrix is not supported in power bi. If you want to add a new column it is equivalent to adding several rows to the data, which is not possible with data that is already fixed. But there is a way you can try it. You can create a new matrix and display the measure separately.SelectedCountry = VAR _SelectedCountry = SELECTEDVALUE('Select Country 1'[Country]) VAR _CurrentCountryList = VALUES(Sheet1[Country]) VAR _isAdded = IF( _SelectedCountry IN _CurrentCountryList, 0, SELECTEDVALUE('HC % Change 1'[Headcount % Change 1]) ) RETURN _isAddedSum of head count = SUM(Sheet1[Headcount])Total = [SelectedCountry] + [Sum of head count]Final output
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi ShejalTiwari ,
According to your description, adding a column to an already fixed matrix is not supported in power bi. If you want to add a new column it is equivalent to adding several rows to the data, which is not possible with data that is already fixed. But there is a way you can try it. You can create a new matrix and display the measure separately.
SelectedCountry =
VAR _SelectedCountry = SELECTEDVALUE('Select Country 1'[Country])
VAR _CurrentCountryList = VALUES(Sheet1[Country])
VAR _isAdded =
IF(
_SelectedCountry IN _CurrentCountryList,
0,
SELECTEDVALUE('HC % Change 1'[Headcount % Change 1])
)
RETURN
_isAddedSum of head count = SUM(Sheet1[Headcount])Total = [SelectedCountry] + [Sum of head count]
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- ShejalTiwari1 year agoFrequent Visitor
Thanks for the solution.