Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Good afternoon,
I have a trouble converting a measure that I created, into a column. Below is the ilustration of the issue:
I successfully created a measure that calculates the mode for each product - so it shows that the mode for Apples in 2021 is 5.96, but I need it as a column, as shown in the screenshot.
The column should pick up the Mode amount for each product and sort it per year. Could somebody help me out with this? I read that a solution might be to create a virtual table from the Mode measure and then use lookup, but this sounds too complicated for someone with my skills.
Thank you very much in advance!
Kind regards,
B
Solved! Go to Solution.
Hi @ase
please try
=
VAR ItemYearTable =
CALCULATETABLE (
TableName,
ALLEXCEPT ( TableName, TableName[Item], TableName[Yea] )
)
VAR SummaryTable =
SUMMARIZE (
ItemYearTable,
TableName[price per unit],
"@cont", CALCULATE ( COUNTROWS ( TableName ) )
)
VAR MaxCount =
MAXX ( SummaryTable, [@count] )
RETURN
MAXX ( FILTER ( SummaryTable, [@count] = MaxCount ), TableName[price per unit] )
It works! Thank you very much for your time and effort!
Hi @ase
please try
=
VAR ItemYearTable =
CALCULATETABLE (
TableName,
ALLEXCEPT ( TableName, TableName[Item], TableName[Yea] )
)
VAR SummaryTable =
SUMMARIZE (
ItemYearTable,
TableName[price per unit],
"@cont", CALCULATE ( COUNTROWS ( TableName ) )
)
VAR MaxCount =
MAXX ( SummaryTable, [@count] )
RETURN
MAXX ( FILTER ( SummaryTable, [@count] = MaxCount ), TableName[price per unit] )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
15 | |
11 | |
8 | |
8 | |
8 |
User | Count |
---|---|
22 | |
13 | |
11 | |
10 | |
10 |