Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello everyone, good afternoon!
I'm preparing a report, where the percentage is coming out very high and I believe it's wrong when I do a data filter, from a large data like the one from 6 years ago.
In print, the largest number 400,611 is the number since we began operations. And the percentage is the percentage considering how many X days or years ago. Where he gives me a comparison of growth in this period.
The largest number is the number of rows that exist in a table in my database. I'm using DISTINCTCOUNT
@agenciamach , Try this
same period based on date range Last Period =
var _max =maxx(ALLSELECTED('Date'),'Date'[date])
var _min =Minx(ALLSELECTED('Date'),'Date'[date])
var datediff1 = datediff(_min,_max,day)+1
var _maxX = _max-datediff1
var _minX = _min -datediff1
return
CALCULATE(sum(Sales[Net Sales]),filter(all('Date'),'Date'[date]<=_maxX && 'Date'[date]>=_minX))
//
//datediff1 & unichar(10) &" Min " & _min & unichar(10) &" Max " & _max & unichar(10) &" LastMin " & _minX & unichar(10) &" LastMax " & _maxX
same period based on date range year behind
Last Period =
var _max =maxx(allseleceted(date),date[date])
var _min =Minx(allseleceted(date),date[date])
var datediff1 = datediff(_min,_max,day)
var _maxX = eomonth(_max,-12)+1
var _minX = eomonth(_min,-12)+1
return
CALCULATE(SUM(Sales[Sales Amount]),filter(all(date,date[date]<=_maxX &&date[date]>=_minX)))
OR
Refer to this:
Power BI How to use/compare two Date/Period slicers: https://youtu.be/WSeZr_-MiTg
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
User | Count |
---|---|
107 | |
89 | |
81 | |
76 | |
73 |
User | Count |
---|---|
112 | |
104 | |
96 | |
74 | |
66 |