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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
i use this script and it works :
now i am trying to use a sumx function
it gave me an error
thank you
Solved! Go to Solution.
@cristianj , try like a measure
TestTopN =
VAR DataCurent =
DATE ( 2023, 5, 2 )
VAR ModelCurent = "iPhone 11"
VAR ShapeCurent = "EXCELENT"
VAR StorageCurent = "128 GB"
VAR TabTemp =
SELECTCOLUMNS (
FILTER (
VanzareZilnica,
VanzareZilnica[Date] >= DataCurent - 30
&& VanzareZilnica[Date] <= DataCurent - 1
&& VanzareZilnica[model] = ModelCurent
&& VanzareZilnica[shape] = ShapeCurent
&& VanzareZilnica[storage] = StorageCurent
),
"Model", VanzareZilnica[model],
"Storage", VanzareZilnica[storage],
"Shape", VanzareZilnica[shape],
"Data", VanzareZilnica[Date].[Date],
"Vanz Zilnica", VanzareZilnica[Vanz Zilnica]
)
VAR tabtest2 =
CALCULATE ( SUMX ( KEEPFILTERS(TOPN ( 5, TabTemp, [Vanz Zilnica], DESC )), [Vanz Zilnica] ) )
RETURN
tabtest2
@cristianj , try like a measure
TestTopN =
VAR DataCurent =
DATE ( 2023, 5, 2 )
VAR ModelCurent = "iPhone 11"
VAR ShapeCurent = "EXCELENT"
VAR StorageCurent = "128 GB"
VAR TabTemp =
SELECTCOLUMNS (
FILTER (
VanzareZilnica,
VanzareZilnica[Date] >= DataCurent - 30
&& VanzareZilnica[Date] <= DataCurent - 1
&& VanzareZilnica[model] = ModelCurent
&& VanzareZilnica[shape] = ShapeCurent
&& VanzareZilnica[storage] = StorageCurent
),
"Model", VanzareZilnica[model],
"Storage", VanzareZilnica[storage],
"Shape", VanzareZilnica[shape],
"Data", VanzareZilnica[Date].[Date],
"Vanz Zilnica", VanzareZilnica[Vanz Zilnica]
)
VAR tabtest2 =
CALCULATE ( SUMX ( KEEPFILTERS(TOPN ( 5, TabTemp, [Vanz Zilnica], DESC )), [Vanz Zilnica] ) )
RETURN
tabtest2
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 80 | |
| 62 | |
| 50 | |
| 45 |