Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
mh20221111
Frequent Visitor

The parameter becomes blank with the Summarize function

When creating a column in a table using the Summarize function with the value selected by the user through the

SELECTEDVALUE function (parameter), the column from the SELECTEDVALUE function becomes blank. How can I ensure that the selected value are displayed?


======Dax sample========
VAR ParamValue = SELECTEDVALUE('ParameterTable'[ParameterColumn])
RETURN
SUMMARIZE(
'YourTable',
'YourTable'[GroupByColumn],
"ColumnA", ParamValue
"Amount",SUM('YourTable'[Amount]) * ParamValue
)

1 ACCEPTED SOLUTION
v-kongfanf-msft
Community Support
Community Support

Hi @mh20221111 ,

 

Try the following to make manual changes:

Result = VAR ParamValue = 2
RETURN
SUMMARIZE(
    CALCULATETABLE(
        'YourTable',
        ALL('ParameterTable') 
    ),
    'YourTable'[GroupByColumn],
    "ColumnA", ParamValue,
    "Amount", SUM('YourTable'[Amount]) * ParamValue
)

vkongfanfmsft_0-1739785257411.png

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-kongfanf-msft
Community Support
Community Support

Hi @mh20221111 ,

 

Try the following to make manual changes:

Result = VAR ParamValue = 2
RETURN
SUMMARIZE(
    CALCULATETABLE(
        'YourTable',
        ALL('ParameterTable') 
    ),
    'YourTable'[GroupByColumn],
    "ColumnA", ParamValue,
    "Amount", SUM('YourTable'[Amount]) * ParamValue
)

vkongfanfmsft_0-1739785257411.png

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Fowmy
Super User
Super User

@mh20221111 

While creating a table or calculated column in Power BI, capturing slicer selections in real-time isn't feasible. Power BI constructs tables and columns before making them available on the report canvas. 

If you want to build a measure, yes it would work but you need to aggregate the SUMMARIZE table results 

SUMX (
SUMMARIZE(
'YourTable',
'YourTable'[GroupByColumn],
"ColumnA", ParamValue
"Amount",SUM('YourTable'[Amount]) * ParamValue
),
[Amount])

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

I understand that it is not feasible to capture slicer selections in real-time while creating a table or calculated column in Power BI.

However, I have further requirements. If there are two categories (category1 and category2) in a table, I want to highlight the largest aggregated result for each category2 when category1 and category2 are set in a matrix visual.

It would be great if Power BI had something similar to the LOD functions in Tableau. My understanding is that we might have to rely on the FILTER or SUMMARIZE functions , but ALL function does not accept calculated tables.

Are there any methods to achieve this?

Max in group.png


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors