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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Sellgren7
Frequent Visitor

Translate Qlik aggr expression to DAX?

Hello

 

Is it possible to translate below expression to DAX or is there another way of achieving the outcome in PBI? I want to translate a table from Qlik into a matrix visual but i cant figure out how to get the aggr equivalent.

 

timestamp(
min({<ColumnX -= {0}>}aggr(
min({<ColumnX -= {0}>} ColumnN,', ')
,ColumnZ,ColumnY, ColumnX))
)

 

BR Tommy

2 REPLIES 2
Sellgren7
Frequent Visitor

Thanks for the quick reply, but i dont fully understand how this will aggregate over several columns? I only see Column1 = ColumnX and Column2 = ColumnN. 

lazurens2
Frequent Visitor

The Qlik aggr function, aggregates a field by a set of fields, I will try to translate into natural language your measure but it's better to provide a expected result to be more accurate 

 

timestamp(           -- format into time stamp
min(                      -- get the minimum value of .. 

{<ColumnX -= {0}>} -- set analysis to filter out ColumnX = 0,

 

aggr(
min({<ColumnX -= {0}>} ColumnN,', ')
,ColumnZ,ColumnY, ColumnX)) -- we get field ColumnN, where row of ColumnX = 0 are filtered out aggregated by ColumnZ,ColumnY, ColumnX
)

 

if I try to translate into dax these components : 

 

 

AggMinValueMeasure = 

VAR AggrMin = SUMMARIZE (
ADDCOLUMNS(
	CALCULATETABLE (
SUMMARIZE (
'Table',
'Table'[Column1],
'Table'[Column2]
),
'Table'[Column1] <> 0
)
,
	"Column1-1", 'Table'[Column1],
	"Column2-2",'Table'[Column2]
),
	"_Min", Min('Table'[Column2])
)

Return AggrMin

 

 

And then format the measure into timestamp in the graphical UI.

Hope this helps. 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors