Forum Discussion

strangerMike's avatar
strangerMike
Icon for Helper II rankHelper II
9 years ago
Solved

Power BI coming from SAS

Hello, i have some previous SAS experience but I am trying to learn more about power BI.  My report in SAS has a lot of formulas and I am trying to figure out what is the best means of translating SAS to Power BI.  Here is an example...


Curr Mo Curr Yr = IF ( Max [_ByGroup_] ('Flag Bounce Rate %'n) > 0 )
RETURN ( ( ( Sum [_ForAll_] ('# of bounces (curr mo curr yr)'n) / Sum [_ForAll_] ('# emails sent (curr mo curr yr)'n) ) * 100 ) Round 1 )
ELSE (
  IF ( Max [_ByGroup_] ('Flag Open Rate %'n) > 0 )
  RETURN ( ( ( Sum [_ForAll_] ('# emails opened (curr mo curr yr)'n) / Sum [_ForAll_] ('# emails sent (curr mo curr yr)'n) ) * 100 ) Round 1 )
  ELSE (
    IF ( Max [_ByGroup_] ('Flag Click Thru Rate %'n) > 0 )
    RETURN ( ( ( Sum [_ForAll_] ('# of Clicks - Total  (curr mo curr yr)'n) / Sum [_ForAll_] ('# emails sent (curr mo curr yr)'n) ) * 100 ) Round 1 )
    ELSE Sum [_ByGroup_] ('Metric (curr mo curr yr)'n) ) )

 

Where can I go to get Power Bi translations.  Like: 'ByGroup', etc.

I am even having difficulty just trying to pull Today's date (without time), everything i have been trying as one error or another.

 

Like Today = Date(now())  or Today = Now(year, month, day) ...etc. Cant hit the nail on the head!

 

 

Thanks

 

2 Replies