Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
i want get current month and previous divide percentage value same like previous year and current year . i have attached my sample pbix file . i have created measure but not working .
sample File : Sample PBIX File
Thanks in advance .
Regards,
Thennarasu
@Anonymous The question is, what are you trying to achieve? Let's say you have 1000 for current and 800 for previous, what do you want the result to be? 1000/800 = 1.25, 800/1000 = .8, (1000-800)/1000 = .2, (1000-800)/800 = .25 or something completely different?
@Greg_Deckler how to convert this value to percentage . i got measure value 1.96 . i am try to convert this value ti percentage . its goes 196 % .
@Anonymous Maybe:
Measure =
VAR __CurrentDate = MAX('Calendar'[Date])
VAR __EOCurrentMonth = EOMONTH(__CurrentDate,0)
VAR __BeginCurrentMonth = DATE(YEAR(__EOCurrentMonth),MONTH(__EOCurrentMonth),1)
VAR __EOPrevMonth = EOMONTH(__CurrentDate,-1)
VAR __BeginPrevMonth = DATE(YEAR(__EOPrevMonth),MONTH(__EOPrevMonth),1)
VAR __Current = CALCULATE(<something>,'Calendar'[Date]>=__BeginCurrentMonth,'Calendar'[Date]<=__EOCurrentMonth)
VAR __Previous = CALCULATE(<something>,'Calendar'[Date]>=__BeginPrevMonth,'Calendar'[Date]<=__EOPrevMonth)
RETURN
DIVIDE(__Current - __Previous,__Previous,0)
@Anonymous Here is one method:
Measure =
VAR __CurrentDate = MAX('Calendar'[Date])
VAR __EOCurrentMonth = EOMONTH(__CurrentDate,0)
VAR __BeginCurrentMonth = DATE(YEAR(__EOCurrentMonth),MONTH(__EOCurrentMonth),1)
VAR __EOPrevMonth = EOMONTH(__CurrentDate,-1)
VAR __BeginPrevMonth = DATE(YEAR(__EOPrevMonth),MONTH(__EOPrevMonth),1)
VAR __Current = CALCULATE(<something>,'Calendar'[Date]>=__BeginCurrentMonth,'Calendar'[Date]<=__EOCurrentMonth)
VAR __Previous = CALCULATE(<something>,'Calendar'[Date]>=__BeginPrevMonth,'Calendar'[Date]<=__EOPrevMonth)
RETURN
DIVIDE(__Current,__Previous,0)
You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008
User | Count |
---|---|
16 | |
14 | |
13 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
15 | |
11 | |
9 |