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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Lily36876
Helper II
Helper II

Use Parameter Values and Group by

Hi Guys,

 

I want to develop a report with setting parameters on filter,

and will directly effect on report result 

But now is fail when I want to group 【CalculateTransactionRange】this columns

Lily36876_0-1709014719506.png

 

I only want to show every shop's 【CalculateTransactionRange】and AMT

I try to use Summarize but seems can't get parameters in table...

Lily36876_1-1709014719821.png

 

Sample Data 

4 REPLIES 4
Anonymous
Not applicable

Hi @Lily36876 ,

 

I made simple samples and you can check the results below:

vtianyichmsft_0-1709173851146.png

 

Measure = VAR _t = ADDCOLUMNS('Table',"A",SUMX(FILTER(ALL('Table'),[ShopNo]=EARLIER([ShopNo])),[AMT]))
RETURN SUMX(_t,[A])

 

Please feel free to correct me and provide more information if I have misunderstood you!

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

 

Hello!!!

 

Thanks for reply, I think i missing to give this infomation.

I don't have range column in data model,

because range level is generated on what my parameter setting 

and my range logic is below

 

CalculateTransactionRange = 
VAR interval1 ='interval_1'[interval1 值]
VAR interval2='interval_2'[interval2 值]
VAR LOWERLimit='LOWER_Limit'[LOWERLimit 值]
VAR UPPERLimit='UPPER_Limit'[UPPERLimit 值]
VAR HPyTotal=SELECTEDVALUE(SalesRecord[HPyTotal])
VAR RANGE=
    SWITCH (
        TRUE (),
        HPyTotal < LOWERLimit,
        SWITCH (
            TRUE (),
            HPyTotal <= LOWERLimit,
            "0 ~ " & LOWERLimit,
            TRUE,
            INT((HPyTotal - LOWERLimit) / interval1) * interval1 + LOWERLimit + 1 & "~" & INT((HPyTotal - LOWERLimit)) / interval1 * interval1 + LOWERLimit + interval1
        ),
        HPyTotal >= LOWERLimit && HPyTotal <= UPPERLimit,
        SWITCH (
            TRUE (),
            HPyTotal <= LOWERLimit + interval1,
            LOWERLimit+1 & "~"  & LOWERLimit + interval1,
            HPyTotal = UPPERLimit,
            UPPERLimit - interval1 + 1 & "~"  & UPPERLimit,
            TRUE,
            INT((HPyTotal - LOWERLimit) / interval1) * interval1 + LOWERLimit + 1 & "~"  & INT((HPyTotal - LOWERLimit) / interval1) * interval1 + LOWERLimit + interval1
        ),
        HPyTotal > UPPERLimit+1,
        SWITCH (
            TRUE (),
            HPyTotal <= UPPERLimit + interval2,
            UPPERLimit + 1 & "~"  & UPPERLimit + interval2,
            TRUE,
            INT((HPyTotal - UPPERLimit - 1) / interval2) * interval2 + UPPERLimit + 1 & "~" & INT((HPyTotal - UPPERLimit - 1) / interval2) * interval2 + UPPERLimit + interval2
        ),
        "Other"
    )
RETURN RANGE
Anonymous
Not applicable

Hi @Lily36876 ,

 

I can't download your attachment because of policy issues, can you describe your problem through a simple sample?

 

Best regards,
Community Support Team_ Scott Chang

Dear Scott,

 

Thanks for reply,

My report is doing to show my shop's each sales price level ($1~$1000、$1001~$2000)

I have four parameters, they work in my dax logic(it's no problem here)

And then

I only want to show each shop and each sales range, I don't need to show each sales record   

Lily36876_1-1709168826830.png

 

May I know why i can't attach my .pbix file here?

It's only can share via link?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors