Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17878

Current period minus Parallel Previous Period percentage change calculation

$
0
0

Dear Friends,

 

Could any one look into my need. 

 

I don't know where to start, but if you read the below "Data Table", hope you could understand easily. Out of the below data table I'm looking for "Percentage change over Parallal previous period". I'm writing the cases over here. And the percentage arriving formula is as below;

 

((After Value – Before Value) / Before Value) * 100

 

Case 1In Detail: If an user selected January month then the result shall be;
((January 2018 - January 2017)/January 2017)*100
Case 2If an user selected Year wise then the result shall be;
((Year 2018 - Year 2017)/Year 2017)*100
Case 3If an user selected Q1 Quarter then the result shall be;
((Q1 2018 - Q1 2017)/Q1 2017)*100
Case 4If an user seleted with a date then the result shall be;
((Selected date - Parallal Previous date)/Parallal Previous date)*100

 

Data Table: 

S.NoNameTitleDateCount
1BrianA17/31/20171
2JossA27/31/20171
3AndyA37/31/20171
4BobB28/3/20171
5DavidB39/15/20171
6JamieA110/13/20171
7ChiruA210/13/20171
8RajendraA310/13/20171
9DavidB111/15/20171
10JamieB211/30/20171
11ChiruB312/4/20171
12RajendraB312/13/20171
13ChiruA11/31/20181
14RajendraA22/5/20181
15DavidA32/28/20181
16JamieB13/6/20181
17BrianB24/11/20181
18JossB39/6/20171
19AndyA19/27/20171
20BobA212/26/20171
21DavidA312/26/20171
22ChiruB18/10/20171
23RajendraB28/31/20171
24DavidB312/4/20171
25JamieA112/13/20171
26BrianA21/31/20181
27JossA32/5/20181

 

Note: The "Count " column tells you that each person got one title at a perticular date. For SUM purpose I created.

----------------------------------------------------------------------------------------------------------------

Tried DAX formula: (But failed to get the result):-

 

Percentage Change =
VAR CurrentSA = [Count Sum]
RETURN
IF (
ISFILTERED ( 'Date'[Date].[Date] ),
CurrentSA
- CALCULATE ( [Count Sum]- PARALLELPERIOD ( 'Date'[Date], -1, YEAR )/PARALLELPERIOD ( 'Date'[Date], -1, YEAR ) ),
IF (
ISFILTERED ( 'Date'[Date].[Date] ),
CurrentSA
- CALCULATE ( [Count Sum]- PARALLELPERIOD ( 'Date'[Date], -1, QUARTER )/PARALLELPERIOD ( 'Date'[Date], -1, QUARTER ) ),
IF (
ISFILTERED ( 'Date'[Date].[Date] ),
CurrentSA
- CALCULATE ( [Count Sum]- PARALLELPERIOD ( 'Date'[Date], -1, MONTH )/PARALLELPERIOD ( 'Date'[Date], -1, MONTH ) ),
IF (
ISFILTERED ( 'Date'[Date] ),
CurrentSA
- CALCULATE ( [Count Sum], 'Date'[Date] - 1 )
)
)
)
)

--------------------------------------------------------------------------------------------------------

 

Your time is much more important to me aswell. Please try...Thanks

Riyaz


Viewing all articles
Browse latest Browse all 17878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>