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.
Hi,
I am in the process of converting a load of Tableau dashboards into Power BI but cannot figure out how to translate this particular measure and was hoping someone could point me in the right direction:
{ EXCLUDE [DATE] : AVG ( { INCLUDE [CATEGORY],[DATE] : AVG ( IF {MAX([DATE])} = [DATE] THEN [TOTAL_SALES] END) }) }
Here [TOTAL_SALES] is a measure.
Thanks in advance!!
Hi @freakinaditya ,
Try:
Average total_sales = CALCULATE(AVERAGEX(
SUMMARIZE('table', 'table'[CATEGORY], 'table'[DATE], "TOTAL_SALES", [TOTAL_SALES])),
[TOTAL_SALES]
),FILTER(ALLSELECTED('table'[DATE]),'table'[DATE]=[LARGEST DATE]))
If the problem persists,could you share the sample data and the result you expected?
How-to-provide-sample-data-in-the-Power-BI-Forum
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@freakinaditya , difficult to tell . Try like
averageX(values(Table[CATEGORY]),calculate([TOTAL_SALES], filter(Table,Table[Date] = max(Table[Date])) allexcept(Table,Table[CATEGORY],Table[DATE])))
If not
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |