Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Align
alignjustified
Standard-BI defines additional function DateDiffDays(from_date, to_date) which will return difference in days between two dates. It can be used together with Now() function (which returns current time) to get distance in days between selected time dimension member and current date, for exampleDateDiffDays(DateParse(Time.CurrentMember.Name), Now())
In addition Standard-BI defines function DateAddDays(date, number_of_days) which will return new date in the past (if numberofdays is negative) or in future (if numberofdays is positive). For example, this will return date which is 5 days from current Time dimension member date.DateAddDays(DateParse(Time.CurrentMember.Name), 5)
Sometimes it is useful to get Time dimension member which corresponds to actual current date. This can be done with Standard-BI specific dimension hierarchy level property CurrentDateMember. For example, these expressions will return month of current date and week of current dateTime.Month.CurrentDateMember
Time.Weekly.Week.CurrentDateMember
If there is no Time dimension level that corresponds to current date (e.g. if data for current month or week are not yet imported) then CurrentDateMember will return the last period before current date which is present in Time dimension corresponding level.

 

...

Noklusētās vērtības

Align
alignjustified
Sometimes you might want some default value if some measure or function will return empty value. In these cases you can use Var būt gadījumi, kad nepieciešams, lai kalkulācija atgriež kādu noklusēto vērtību, ja kāds rādītājs vai funkcija atgriež tukšumu,  jeb rezultāta nav. Šādos gadījumos jūs varat izmantot CoalesceEmpty(expression, default_value) function, for exampleCoalesceEmptyfunkciju, kur "expression" ir aprēkināmā vērtība kura var būt tušums, piemēram  - CoalesceEmpty(Measures.Store Sales, 0)

 

...

Komentāri

Align
alignjustified

Ir iespējams rakstīt komentārus kalkulāciju formulās. Izmantojiet komentārus, lai aprakstītu, paskaidrotu kādas ne uzreiz izprotamas kalkulāciju formulas vai testējot, rakstot jaunas formulas  -  kad kāda formula nestrādā, kā paredzēts, varat "izkomentēt"  dālu no formulas ārā un tad pārbaudīt tās pareizību, bet pēc tam atkal iekļaut formulā, ja nepieciešams.  

-- vienas rindiņas komentārs
expression –  komentārs līdz rindiņas beigām
/* vairākas rindiņas garš komentārs
*/

 

...