Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Experts
i am trying to work out the sales based on the max date as a measure and following is not working
Measure =
VAR _lastdate = max(all(table[peroddate]))
Return
Calculate[charged days],Filter('table,'table[peroddate] = _lastdate))
getting erro message the MAX function only accepts a column as a reference in a n argument.
Hi @Anonymous
Try this:
Measure =
VAR _lastdate = Calculate(max(table[peroddate]),all(table))
Return
Calculate([charged days],Filter('table,'table[peroddate] = _lastdate))
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
the issue is the date in the live connect in fact table is 1.11.21. where as the table in the power bi model has a max date or 1.10.21
Hi @Anonymous ,
In order to make troubleshooting and provide you a suitable solution, could you please share some raw data in your table with Text format , the formula of measure [charged days] and your expected result with calculation logic and special examples?
1. Raw data
2. The formula of measure [charged days]
charged days=calculate(count(xx),filter('table',xxx))
3. Expected result
Best Regards
@Anonymous , Try like
Measure =
VAR _lastdate = maxX(all(table) , table[peroddate]))
Return
Calculate[charged days],Filter('table,'table[peroddate] = _lastdate))
or
use
maxX(allselected(table) , table[peroddate]))
not working - sorry all, not getting the correct values for max date which is 01.10.21
Is [charged days] a measure? if yes, Can you share a code you used for [charged days]?
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
User | Count |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
99 | |
92 | |
50 | |
49 | |
46 |