diff --git a/src/Dax.Template.TestUI/Templates/Config-01 - Standard.template.json b/src/Dax.Template.TestUI/Templates/Config-01 - Standard Gregorian.template.json similarity index 98% rename from src/Dax.Template.TestUI/Templates/Config-01 - Standard.template.json rename to src/Dax.Template.TestUI/Templates/Config-01 - Standard Gregorian.template.json index 06c3274..7370474 100644 --- a/src/Dax.Template.TestUI/Templates/Config-01 - Standard.template.json +++ b/src/Dax.Template.TestUI/Templates/Config-01 - Standard Gregorian.template.json @@ -51,7 +51,6 @@ "LastYearMax": null, "AutoScan": "Full", "DefaultVariables": { - "__FirstFiscalMonth": "4", "__FirstDayOfWeek": "0" }, "IsoCountry": "US", diff --git a/src/Dax.Template.TestUI/Templates/Config-02 - Standard Fiscal.template.json b/src/Dax.Template.TestUI/Templates/Config-02 - Standard Fiscal.template.json new file mode 100644 index 0000000..d6c780b --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/Config-02 - Standard Fiscal.template.json @@ -0,0 +1,84 @@ +{ + "Description": "Standard fiscal calendar with holidays and standard fiscal time intelligence", + "Templates": [ + { + "Class": "HolidaysDefinitionTable", + "Table": "HolidaysDefinition", + "Template": "HolidaysDefinition.json", + "IsHidden": true + }, + { + "Class": "HolidaysTable", + "Table": "Holidays", + "Template": null, + "IsHidden": true + }, + { + "Class": "CustomDateTable", + "Table": "Date", + "ReferenceTable": "DateAutoTemplate", + "Template": "DateTemplate-02.json", + "LocalizationFiles": [ + ] + }, + { + "Class": "MeasuresTemplate", + "Table": null, + "Template": "TimeIntelligence-02.json", + "Properties": { + "__DisplayFolderRule": "Time intelligence\\@_MEASURE_@\\@_TEMPLATEFOLDER_@", + "_DisplayFolderRule": "Time intelligence\\@_TEMPLATEFOLDER_@\\@_TEMPLATE_@", + "___DisplayFolderRule": "Time intelligence\\@_TEMPLATEFOLDER_@\\@_MEASURE_@", + "DisplayFolderRule": "Time intelligence\\@_TEMPLATEFOLDER_@\\@_MEASUREFOLDER_@\\@_MEASURE_@", + "DisplayFolderRuleSingleInstanceMeasures": "Hidden Time Intelligence" + }, + "_comment": "TargetMeasures can override the default setting" + } + ], + "IsoTranslation": "en-US", + "IsoFormat": "en-US", + "LocalizationFiles": [ + "DateLocalization-02.json" + ], + "OnlyTablesColumns": [ + "Sales", + "Orders" + ], + "ExceptTablesColumns": [], + "FirstYearMin": null, + "FirstYearMax": null, + "LastYearMin": null, + "LastYearMax": null, + "AutoScan": "Full", + "DefaultVariables": { + "__FirstFiscalMonth": "7", + "__FirstDayOfWeek": "0" + }, + "IsoCountry": "US", + "InLieuOfPrefix": "(in lieu of ", + "InLieuOfSuffix": ")", + "WorkingDays": "{ 2, 3, 4, 5, 6 }", + "HolidaysDefinitionTable": "HolidaysDefinition", + + "HolidaysReference": { + "TableName": "Holidays", + "DateColumnName": "Holiday Date", + "HolidayColumnName": "Holiday Name" + }, + "TableSingleInstanceMeasures": "Sales", + "AutoNaming": "Prefix", + "TargetMeasures": [ + { + "Name": "Sales Amount" + }, + { + "Name": "Total Cost" + }, + { + "Name": "Margin" + }, + { + "Name": "Margin %" + } + ] +} \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/Config-02 - Monthly.template.json b/src/Dax.Template.TestUI/Templates/Config-03 - Monthly Gregorian.template.json similarity index 88% rename from src/Dax.Template.TestUI/Templates/Config-02 - Monthly.template.json rename to src/Dax.Template.TestUI/Templates/Config-03 - Monthly Gregorian.template.json index 45c2886..7d7a8c0 100644 --- a/src/Dax.Template.TestUI/Templates/Config-02 - Monthly.template.json +++ b/src/Dax.Template.TestUI/Templates/Config-03 - Monthly Gregorian.template.json @@ -5,14 +5,14 @@ "Class": "CustomDateTable", "Table": "Date", "ReferenceTable": "DateAutoTemplate", - "Template": "DateTemplate-02.json", + "Template": "DateTemplate-03.json", "LocalizationFiles": [ ] }, { "Class": "MeasuresTemplate", "Table": null, - "Template": "TimeIntelligence-02.json", + "Template": "TimeIntelligence-03.json", "Properties": { "__DisplayFolderRule": "Time intelligence\\@_MEASURE_@\\@_TEMPLATEFOLDER_@", "DisplayFolderRule": "Time intelligence\\@_TEMPLATEFOLDER_@\\@_TEMPLATE_@", @@ -24,7 +24,7 @@ "IsoTranslation": "en-US", "IsoFormat": "en-US", "LocalizationFiles": [ - "DateLocalization-02.json" + "DateLocalization-03.json" ], "OnlyTablesColumns": [ "Sales", @@ -37,7 +37,6 @@ "LastYearMax": null, "AutoScan": "Full", "DefaultVariables": { - "__FirstFiscalMonth": "4", "__MonthsInYear": "12" }, "IsoCountry": "US", diff --git a/src/Dax.Template.TestUI/Templates/Config-04 - Monthly Fiscal.template.json b/src/Dax.Template.TestUI/Templates/Config-04 - Monthly Fiscal.template.json new file mode 100644 index 0000000..ad809ca --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/Config-04 - Monthly Fiscal.template.json @@ -0,0 +1,54 @@ +{ + "Description": "Monthly fiscal calendar and monthly fiscal time intelligence", + "Templates": [ + { + "Class": "CustomDateTable", + "Table": "Date", + "ReferenceTable": "DateAutoTemplate", + "Template": "DateTemplate-04.json", + "LocalizationFiles": [ + ] + }, + { + "Class": "MeasuresTemplate", + "Table": null, + "Template": "TimeIntelligence-04.json", + "Properties": { + "__DisplayFolderRule": "Time intelligence\\@_MEASURE_@\\@_TEMPLATEFOLDER_@", + "DisplayFolderRule": "Time intelligence\\@_TEMPLATEFOLDER_@\\@_TEMPLATE_@", + "_DisplayFolderRule": "Time intelligence\\@_TEMPLATEFOLDER_@\\@_MEASURE_@" + }, + "_comment": "TargetMeasures can override the default setting" + } + ], + "IsoTranslation": "en-US", + "IsoFormat": "en-US", + "LocalizationFiles": [ + "DateLocalization-04.json" + ], + "OnlyTablesColumns": [ + "Sales", + "Orders" + ], + "ExceptTablesColumns": [], + "FirstYearMin": null, + "FirstYearMax": null, + "LastYearMin": null, + "LastYearMax": null, + "AutoScan": "Full", + "DefaultVariables": { + "__FirstFiscalMonth": "4", + "__MonthsInYear": "12" + }, + "IsoCountry": "US", + + "AutoNaming": "Prefix", + "TargetMeasures": [ + { + "Name": "Sales Amount" + }, + { + "Name": "Total Cost" + } + ] +} \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/Config-03 - Custom.template.json b/src/Dax.Template.TestUI/Templates/Config-05 - Custom Gregorian.template.json similarity index 92% rename from src/Dax.Template.TestUI/Templates/Config-03 - Custom.template.json rename to src/Dax.Template.TestUI/Templates/Config-05 - Custom Gregorian.template.json index 99cedd3..7f979b7 100644 --- a/src/Dax.Template.TestUI/Templates/Config-03 - Custom.template.json +++ b/src/Dax.Template.TestUI/Templates/Config-05 - Custom Gregorian.template.json @@ -17,14 +17,14 @@ "Class": "CustomDateTable", "Table": "Date", "ReferenceTable": "DateAutoTemplate", - "Template": "DateTemplate-03.json", + "Template": "DateTemplate-05.json", "LocalizationFiles": [ ] }, { "Class": "MeasuresTemplate", "Table": null, - "Template": "TimeIntelligence-03.json", + "Template": "TimeIntelligence-05.json", "Properties": { "DisplayFolderRule": "Time intelligence\\@_MEASURE_@\\@_TEMPLATEFOLDER_@", "_DisplayFolderRule": "Time intelligence\\@_TEMPLATEFOLDER_@\\@_TEMPLATE_@", @@ -36,7 +36,7 @@ "IsoTranslation": "en-US", "IsoFormat": "en-US", "LocalizationFiles": [ - "DateLocalization-03.json" + "DateLocalization-05.json" ], "OnlyTablesColumns": [ "Sales", @@ -49,7 +49,6 @@ "LastYearMax": null, "AutoScan": "Full", "DefaultVariables": { - "__FirstFiscalMonth": "4", "__FirstDayOfWeek": "0" }, "IsoCountry": "US", diff --git a/src/Dax.Template.TestUI/Templates/Config-06 - Custom Fiscal.template.json b/src/Dax.Template.TestUI/Templates/Config-06 - Custom Fiscal.template.json new file mode 100644 index 0000000..190dd7c --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/Config-06 - Custom Fiscal.template.json @@ -0,0 +1,75 @@ +{ + "Description": "Custom fiscal calendar based on months with custom time intelligence", + "Templates": [ + { + "Class": "HolidaysDefinitionTable", + "Table": "HolidaysDefinition", + "Template": "HolidaysDefinition.json", + "IsHidden": true + }, + { + "Class": "HolidaysTable", + "Table": "Holidays", + "Template": null, + "IsHidden": true + }, + { + "Class": "CustomDateTable", + "Table": "Date", + "ReferenceTable": "DateAutoTemplate", + "Template": "DateTemplate-06.json", + "LocalizationFiles": [ + ] + }, + { + "Class": "MeasuresTemplate", + "Table": null, + "Template": "TimeIntelligence-06.json", + "Properties": { + "DisplayFolderRule": "Time intelligence\\@_MEASURE_@\\@_TEMPLATEFOLDER_@", + "_DisplayFolderRule": "Time intelligence\\@_TEMPLATEFOLDER_@\\@_TEMPLATE_@", + "__DisplayFolderRule": "Time intelligence\\@_TEMPLATEFOLDER_@\\@_MEASURE_@" + }, + "_comment": "TargetMeasures can override the default setting" + } + ], + "IsoTranslation": "en-US", + "IsoFormat": "en-US", + "LocalizationFiles": [ + "DateLocalization-06.json" + ], + "OnlyTablesColumns": [ + "Sales", + "Orders" + ], + "ExceptTablesColumns": [], + "FirstYearMin": null, + "FirstYearMax": null, + "LastYearMin": null, + "LastYearMax": null, + "AutoScan": "Full", + "DefaultVariables": { + "__FirstFiscalMonth": "4", + "__FirstDayOfWeek": "0" + }, + "IsoCountry": "US", + "InLieuOfPrefix": "(in lieu of ", + "InLieuOfSuffix": ")", + "WorkingDays": "{ 2, 3, 4, 5, 6 }", + "HolidaysDefinitionTable": "HolidaysDefinition", + + "HolidaysReference": { + "TableName": "Holidays", + "DateColumnName": "Holiday Date", + "HolidayColumnName": "Holiday Name" + }, + "AutoNaming": "Prefix", + "TargetMeasures": [ + { + "Name": "Sales Amount" + }, + { + "Name": "Total Cost" + } + ] +} \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/Config-04 - Weekly.template.json b/src/Dax.Template.TestUI/Templates/Config-07 - Weekly.template.json similarity index 93% rename from src/Dax.Template.TestUI/Templates/Config-04 - Weekly.template.json rename to src/Dax.Template.TestUI/Templates/Config-07 - Weekly.template.json index c0ea2da..a1466f4 100644 --- a/src/Dax.Template.TestUI/Templates/Config-04 - Weekly.template.json +++ b/src/Dax.Template.TestUI/Templates/Config-07 - Weekly.template.json @@ -17,15 +17,15 @@ "Class": "CustomDateTable", "Table": "Date", "ReferenceTable": "DateAutoTemplate", - "Template": "DateTemplate-04.json", + "Template": "DateTemplate-07.json", "LocalizationFiles": [ - "DateLocalization-04.json" + "DateLocalization-07.json" ] }, { "Class": "MeasuresTemplate", "Table": null, - "Template": "TimeIntelligence-04.json", + "Template": "TimeIntelligence-07.json", "Properties": { "__DisplayFolderRule": "Time intelligence\\@_MEASURE_@\\@_TEMPLATEFOLDER_@", "_DisplayFolderRule": "Time intelligence\\@_TEMPLATEFOLDER_@\\@_TEMPLATE_@", @@ -46,7 +46,7 @@ "IsoTranslation": "en-US", "IsoFormat": "en-US", "LocalizationFiles": [ - "DateLocalization-04.json" + "DateLocalization-07.json" ], "OnlyTablesColumns": [ "Sales", diff --git a/src/Dax.Template.TestUI/Templates/Config-05 - Standard dates no text.template.json b/src/Dax.Template.TestUI/Templates/Config-95 - Standard dates no text.template.json similarity index 98% rename from src/Dax.Template.TestUI/Templates/Config-05 - Standard dates no text.template.json rename to src/Dax.Template.TestUI/Templates/Config-95 - Standard dates no text.template.json index 13632d7..23dd56e 100644 --- a/src/Dax.Template.TestUI/Templates/Config-05 - Standard dates no text.template.json +++ b/src/Dax.Template.TestUI/Templates/Config-95 - Standard dates no text.template.json @@ -16,7 +16,7 @@ "Class": "CustomDateTable", "Table": "Date", "ReferenceTable": "DateAutoTemplate", - "Template": "DateTemplate-05.json", + "Template": "DateTemplate-95.json", "LocalizationFiles": [ ] }, diff --git a/src/Dax.Template.TestUI/Templates/DateLocalization-01.json b/src/Dax.Template.TestUI/Templates/DateLocalization-01.json index b8bfaff..d4e861b 100644 --- a/src/Dax.Template.TestUI/Templates/DateLocalization-01.json +++ b/src/Dax.Template.TestUI/Templates/DateLocalization-01.json @@ -75,12 +75,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Year Quarter", "Name": "Anno Trimestre", @@ -266,12 +260,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Year Month", "Name": "Année Mois", @@ -322,7 +310,7 @@ }, { "OriginalName": "Fiscal Year Quarter", - "Name": "Année Trimestre Fiscal", + "Name": "Anno Trimestre Fiscale", "Description": "", "DisplayFolders": "" }, @@ -451,12 +439,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Year Month", "Name": "Año Mes", @@ -565,7 +547,7 @@ "Hierarchies": [ { "OriginalName": "Calendar", - "Name": "Civil", + "Name": "Solar", "Description": "", "DisplayFolders": "", "Levels": [ @@ -636,12 +618,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Year Month", "Name": "Ano Mês", @@ -821,12 +797,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Quarter", - "Name": "Quartal", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Year Month", "Name": "Jahr Monat", @@ -1006,12 +976,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Quarter", - "Name": "季度名称", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Year Month", "Name": "年月名称", diff --git a/src/Dax.Template.TestUI/Templates/DateLocalization-02.json b/src/Dax.Template.TestUI/Templates/DateLocalization-02.json index 3724d93..d4e861b 100644 --- a/src/Dax.Template.TestUI/Templates/DateLocalization-02.json +++ b/src/Dax.Template.TestUI/Templates/DateLocalization-02.json @@ -9,8 +9,8 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal Year-Month", - "Name": "Anno-Mese Fiscale", + "OriginalName": "Calendar", + "Name": "Solare", "Description": "", "DisplayFolders": "", "Levels": [ @@ -23,35 +23,17 @@ "OriginalName": "Month", "Name": "Mese", "Description": "" - } - ] - }, - { - "OriginalName": "Fiscal Year-Quarter", - "Name": "Anno-Trimestre Fiscale", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Anno", - "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, - { - "OriginalName": "Month", - "Name": "Mese", + "OriginalName": "Date", + "Name": "Data", "Description": "" } ] }, { - "OriginalName": "Year-Month", - "Name": "Anno-Mese", + "OriginalName": "Fiscal", + "Name": "Fiscale", "Description": "", "DisplayFolders": "", "Levels": [ @@ -64,28 +46,10 @@ "OriginalName": "Month", "Name": "Mese", "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter", - "Name": "Anno-Trimestre", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Anno", - "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, - { - "OriginalName": "Month", - "Name": "Mese", + "OriginalName": "Date", + "Name": "Data", "Description": "" } ] @@ -117,12 +81,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Year Month", "Name": "Anno Mese", @@ -230,8 +188,8 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal Year-Month", - "Name": "Année-Mois Fiscal", + "OriginalName": "Calendar", + "Name": "Solaire", "Description": "", "DisplayFolders": "", "Levels": [ @@ -244,35 +202,17 @@ "OriginalName": "Month", "Name": "Mois", "Description": "" - } - ] - }, - { - "OriginalName": "Fiscal Year-Quarter", - "Name": "Année-Trimestre Fiscal", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "An", - "Description": "" - }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" }, { - "OriginalName": "Month", - "Name": "Mois", + "OriginalName": "Date", + "Name": "Date", "Description": "" } ] }, { - "OriginalName": "Year-Month", - "Name": "Année-Mois", + "OriginalName": "Fiscal", + "Name": "Fiscal", "Description": "", "DisplayFolders": "", "Levels": [ @@ -285,28 +225,10 @@ "OriginalName": "Month", "Name": "Mois", "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter", - "Name": "Année-Trimestre", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "An", - "Description": "" - }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" }, { - "OriginalName": "Month", - "Name": "Mois", + "OriginalName": "Date", + "Name": "Date", "Description": "" } ] @@ -338,12 +260,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Year Month", "Name": "Année Mois", @@ -394,7 +310,7 @@ }, { "OriginalName": "Fiscal Year Quarter", - "Name": "Année Trimestre Fiscal", + "Name": "Anno Trimestre Fiscale", "Description": "", "DisplayFolders": "" }, @@ -410,12 +326,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Fiscal Month", - "Name": "Mois Fiscal", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Working Day", "Name": "Jour Ouvrable", @@ -457,8 +367,8 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal Year-Month", - "Name": "Año-Mes Fiscal", + "OriginalName": "Calendar", + "Name": "Solar", "Description": "", "DisplayFolders": "", "Levels": [ @@ -471,35 +381,17 @@ "OriginalName": "Month", "Name": "Mes", "Description": "" - } - ] - }, - { - "OriginalName": "Fiscal Year-Quarter", - "Name": "Año-Trimestre Fiscal", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Año", - "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, - { - "OriginalName": "Month", - "Name": "Mes", + "OriginalName": "Date", + "Name": "Fecha", "Description": "" } ] }, { - "OriginalName": "Year-Month", - "Name": "Año-Mes", + "OriginalName": "Fiscal", + "Name": "Fiscal", "Description": "", "DisplayFolders": "", "Levels": [ @@ -512,28 +404,10 @@ "OriginalName": "Month", "Name": "Mes", "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter", - "Name": "Año-Trimestre", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Año", - "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, - { - "OriginalName": "Month", - "Name": "Mes", + "OriginalName": "Date", + "Name": "Fecha", "Description": "" } ] @@ -565,12 +439,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Year Month", "Name": "Año Mes", @@ -637,12 +505,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Fiscal Month", - "Name": "Mes Fiscal", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Working Day", "Name": "Día de trabajo", @@ -684,8 +546,8 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal Year-Month", - "Name": "Ano-Mês Fiscal", + "OriginalName": "Calendar", + "Name": "Solar", "Description": "", "DisplayFolders": "", "Levels": [ @@ -698,35 +560,17 @@ "OriginalName": "Month", "Name": "Mês", "Description": "" - } - ] - }, - { - "OriginalName": "Fiscal Year-Quarter", - "Name": "Ano-Trimestre Fiscal", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Ano", - "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, - { - "OriginalName": "Month", - "Name": "Mês", + "OriginalName": "Date", + "Name": "Data", "Description": "" } ] }, { - "OriginalName": "Year-Month", - "Name": "Ano-Mês", + "OriginalName": "Fiscal", + "Name": "Fiscal", "Description": "", "DisplayFolders": "", "Levels": [ @@ -739,28 +583,10 @@ "OriginalName": "Month", "Name": "Mês", "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter", - "Name": "Ano-Trimestre", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Ano", - "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, - { - "OriginalName": "Month", - "Name": "Mês", + "OriginalName": "Date", + "Name": "Data", "Description": "" } ] @@ -792,12 +618,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Year Month", "Name": "Ano Mês", @@ -864,12 +684,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Fiscal Month", - "Name": "Mês Fiscal", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Working Day", "Name": "Dia de Trabalho", @@ -911,8 +725,8 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal Year-Month", - "Name": "Fiskaljahr-Monat", + "OriginalName": "Calendar", + "Name": "Kalender", "Description": "", "DisplayFolders": "", "Levels": [ @@ -925,35 +739,17 @@ "OriginalName": "Month", "Name": "Monat", "Description": "" - } - ] - }, - { - "OriginalName": "Fiscal Year-Quarter", - "Name": "Fiskaljahr-Quartal", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Jahr", - "Description": "" - }, - { - "OriginalName": "Quarter", - "Name": "Quartal", - "Description": "" }, { - "OriginalName": "Month", - "Name": "Monat", + "OriginalName": "Date", + "Name": "Datum", "Description": "" } ] }, { - "OriginalName": "Year-Month", - "Name": "Jahr-Monat", + "OriginalName": "Fiscal", + "Name": "Fiskalisch", "Description": "", "DisplayFolders": "", "Levels": [ @@ -966,28 +762,10 @@ "OriginalName": "Month", "Name": "Monat", "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter", - "Name": "Jahr-Quartal", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Jahr", - "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Quartal", - "Description": "" - }, - { - "OriginalName": "Month", - "Name": "Monat", + "OriginalName": "Date", + "Name": "Datum", "Description": "" } ] @@ -1019,12 +797,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Quarter", - "Name": "Quartal", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "Year Month", "Name": "Jahr Monat", @@ -1120,38 +892,6 @@ "Name": "DatumMitTransaktionen", "Description": "", "DisplayFolders": "" - }, - { - "OriginalName": "Year Month Key", - "Name": "Jahr Monat Schlüssel", - "Description": "", - "DisplayFolders": "", - "FormatString": null - }, - { - "OriginalName": "Month in Quarter Number", - "Name": "Monat im Quartal Nummer", - "Description": "", - "DisplayFolders": "", - "FormatString": null - }, - { - "OriginalName": "Fiscal Month", - "Name": "Geschäftsmonat", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Fiscal Month Number", - "Name": "Geschäftsmonat Nummer", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Fiscal Month in Quarter Number", - "Name": "Geschäftsmonat im Quartal Nummer", - "Description": "", - "DisplayFolders": "" } ] }, @@ -1164,83 +904,47 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal Year-Month", - "Name": "财政年-月", + "OriginalName": "Calendar", + "Name": "日历", "Description": "", "DisplayFolders": "", "Levels": [ { "OriginalName": "Year", - "Name": "年", + "Name": "年份", "Description": "" }, { "OriginalName": "Month", - "Name": "月", - "Description": "" - } - ] - }, - { - "OriginalName": "Fiscal Year-Quarter", - "Name": "财政年-季", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "年", + "Name": "月份名称", "Description": "" }, { - "OriginalName": "Quarter", - "Name": "季", - "Description": "" - }, - { - "OriginalName": "Month", - "Name": "月", + "OriginalName": "Date", + "Name": "日期", "Description": "" } ] }, { - "OriginalName": "Year-Month", - "Name": "年-月", + "OriginalName": "Fiscal", + "Name": "财政", "Description": "", "DisplayFolders": "", "Levels": [ { "OriginalName": "Year", - "Name": "年", + "Name": "年份", "Description": "" }, { "OriginalName": "Month", - "Name": "月", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter", - "Name": "年-季", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "年", - "Description": "" - }, - { - "OriginalName": "Quarter", - "Name": "季", + "Name": "月份名称", "Description": "" }, { - "OriginalName": "Month", - "Name": "月", + "OriginalName": "Date", + "Name": "日期", "Description": "" } ] @@ -1255,21 +959,20 @@ "FormatString": null }, { - "OriginalName": "Year Month Key", - "Name": "年份月份", + "OriginalName": "Year", + "Name": "年份", "Description": "", - "DisplayFolders": "", - "FormatString": null + "DisplayFolders": "" }, { - "OriginalName": "Month", - "Name": "月份名称", + "OriginalName": "Year Quarter Number", + "Name": "年季数", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Month Number", - "Name": "月份数", + "OriginalName": "Year Quarter", + "Name": "年季名称", "Description": "", "DisplayFolders": "" }, @@ -1286,57 +989,38 @@ "DisplayFolders": "" }, { - "OriginalName": "Month in Quarter Number", - "Name": "本季度月份序号", - "Description": "", - "DisplayFolders": "", - "FormatString": null - }, - { - "OriginalName": "Quarter", - "Name": "季度名称", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Year Quarter", - "Name": "年季名称", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Year Quarter Number", - "Name": "年季数", + "OriginalName": "Month", + "Name": "月份名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year", - "Name": "年份", + "OriginalName": "Month Number", + "Name": "月份", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month", - "Name": "财政月份名称", + "OriginalName": "Day of Week", + "Name": "周内日", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "财政月份数", + "OriginalName": "Day of Week Number", + "Name": "周内日序号", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month in Quarter Number", - "Name": "本季度财政月份序号", + "OriginalName": "Fiscal Year", + "Name": "财政年份名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "财政季度名称", + "OriginalName": "Fiscal Year Number", + "Name": "财政年份数", "Description": "", "DisplayFolders": "" }, @@ -1353,26 +1037,8 @@ "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "财政年份名称", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Fiscal Year Number", - "Name": "财政年份数", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Week", - "Name": "周内日", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Week Number", - "Name": "周内日序号", + "OriginalName": "Fiscal Quarter", + "Name": "财政季度名称", "Description": "", "DisplayFolders": "" }, diff --git a/src/Dax.Template.TestUI/Templates/DateLocalization-03.json b/src/Dax.Template.TestUI/Templates/DateLocalization-03.json index f1c5ff1..43a075f 100644 --- a/src/Dax.Template.TestUI/Templates/DateLocalization-03.json +++ b/src/Dax.Template.TestUI/Templates/DateLocalization-03.json @@ -9,8 +9,8 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal", - "Name": "Fiscale", + "OriginalName": "Calendar", + "Name": "Solare", "Description": "", "DisplayFolders": "", "Levels": [ @@ -20,14 +20,37 @@ "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Trimestre", + "OriginalName": "Month", + "Name": "Mese", + "Description": "" + }, + { + "OriginalName": "Date", + "Name": "Data", + "Description": "" + } + ] + }, + { + "OriginalName": "Fiscal", + "Name": "Fiscale", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Anno", "Description": "" }, { "OriginalName": "Month", "Name": "Mese", "Description": "" + }, + { + "OriginalName": "Date", + "Name": "Data", + "Description": "" } ] } @@ -41,98 +64,92 @@ "FormatString": null }, { - "OriginalName": "DateKey", - "Name": "DateKey", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Sequential Day Number", - "Name": "Numero giorno sequenziale", + "OriginalName": "Year", + "Name": "Anno", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month", - "Name": "Anno Mese", + "OriginalName": "Year Quarter Number", + "Name": "Anno Trimestre Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month Number", - "Name": "Anno Mese Numero", + "OriginalName": "Year Quarter", + "Name": "Anno Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "Anno Fiscale", + "OriginalName": "Quarter", + "Name": "Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Number", - "Name": "Anno Fiscale Numero", + "OriginalName": "Year Month", + "Name": "Anno Mese", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "Anno Trimestre Fiscale", + "OriginalName": "Year Month Number", + "Name": "Anno Mese Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "Anno Trimestre Fiscale Numero", + "OriginalName": "Month", + "Name": "Mese", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "Trimestre Fiscale", + "OriginalName": "Month Number", + "Name": "Mese Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Month", - "Name": "Mese", + "OriginalName": "Day of Week", + "Name": "Giorno Settimana", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "Mese Fiscale Numero", + "OriginalName": "Day of Week Number", + "Name": "Giorno Settimana Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month in Quarter Number", - "Name": "Mese Fiscale in Trimestre Numero", + "OriginalName": "Fiscal Year", + "Name": "Anno Fiscale", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week", - "Name": "Giorno Settimana", + "OriginalName": "Fiscal Year Number", + "Name": "Anno Fiscale Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week Number", - "Name": "Giorno Settimana Numero", + "OriginalName": "Fiscal Year Quarter", + "Name": "Anno Trimestre Fiscale", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Month Number", - "Name": "Giorno Mese Numero", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Anno Trimestre Fiscale Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Fiscal Year Number", - "Name": "Giorno Anno Fiscale Numero", + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscale", "Description": "", "DisplayFolders": "" }, @@ -177,8 +194,8 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal", - "Name": "Fiscal", + "OriginalName": "Calendar", + "Name": "Solaire", "Description": "", "DisplayFolders": "", "Levels": [ @@ -188,14 +205,37 @@ "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Trimestre", + "OriginalName": "Month", + "Name": "Mois", + "Description": "" + }, + { + "OriginalName": "Date", + "Name": "Date", + "Description": "" + } + ] + }, + { + "OriginalName": "Fiscal", + "Name": "Fiscal", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "An", "Description": "" }, { "OriginalName": "Month", "Name": "Mois", "Description": "" + }, + { + "OriginalName": "Date", + "Name": "Date", + "Description": "" } ] } @@ -209,98 +249,92 @@ "FormatString": null }, { - "OriginalName": "DateKey", - "Name": "DateKey", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Sequential Day Number", - "Name": "Numéro de jour séquentiel", + "OriginalName": "Year", + "Name": "An", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month", - "Name": "Année Mois", + "OriginalName": "Year Quarter Number", + "Name": "Année Trimestre Numéro", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month Number", - "Name": "Année Mois Numéro", + "OriginalName": "Year Quarter", + "Name": "Année Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "Exercice Fiscal", + "OriginalName": "Quarter", + "Name": "Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Number", - "Name": "Exercice Fiscal Numéro", + "OriginalName": "Year Month", + "Name": "Année Mois", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "Anno Trimestre Fiscale", + "OriginalName": "Year Month Number", + "Name": "Année Mois Numéro", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "Exercice Fiscal Trimestre", + "OriginalName": "Month", + "Name": "Mois", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "Trimestre Fiscal", + "OriginalName": "Month Number", + "Name": "Mois Numéro", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Month", - "Name": "Mois", + "OriginalName": "Day of Week", + "Name": "Jour de la Semaine", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "Mois Fiscal Numéro", + "OriginalName": "Day of Week Number", + "Name": "Jour de la Semaine Numéro", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month in Quarter Number", - "Name": "Mois Fiscal en Trimestre Numéro", + "OriginalName": "Fiscal Year", + "Name": "Exercice Fiscal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week", - "Name": "Giorno Settimana", + "OriginalName": "Fiscal Year Number", + "Name": "Exercice Fiscal Numéro", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week", - "Name": "Jour de la Semaine", + "OriginalName": "Fiscal Year Quarter", + "Name": "Anno Trimestre Fiscale", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week Number", - "Name": "Jour de la Semaine Numéro", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Exercice Fiscal Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Fiscal Year Number", - "Name": "Jour de l'Année Fiscale Numéro", + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", "Description": "", "DisplayFolders": "" }, @@ -345,8 +379,8 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal", - "Name": "Fiscal", + "OriginalName": "Calendar", + "Name": "Solar", "Description": "", "DisplayFolders": "", "Levels": [ @@ -356,14 +390,37 @@ "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Trimestre", + "OriginalName": "Month", + "Name": "Mes", + "Description": "" + }, + { + "OriginalName": "Date", + "Name": "Fecha", + "Description": "" + } + ] + }, + { + "OriginalName": "Fiscal", + "Name": "Fiscal", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Año", "Description": "" }, { "OriginalName": "Month", "Name": "Mes", "Description": "" + }, + { + "OriginalName": "Date", + "Name": "Fecha", + "Description": "" } ] } @@ -377,92 +434,92 @@ "FormatString": null }, { - "OriginalName": "DateKey", - "Name": "DateKey", + "OriginalName": "Year", + "Name": "Año", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Sequential Day Number", - "Name": "Número de día secuencial", + "OriginalName": "Year Quarter Number", + "Name": "Año Trimestre Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month", - "Name": "Año Mes", + "OriginalName": "Year Quarter", + "Name": "Año Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month Number", - "Name": "Año Mes Número", + "OriginalName": "Quarter", + "Name": "Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "Año Fiscal", + "OriginalName": "Year Month", + "Name": "Año Mes", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Number", - "Name": "Año Fiscal Número", + "OriginalName": "Year Month Number", + "Name": "Año Mes Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "Trimestre del año fiscal", + "OriginalName": "Month", + "Name": "Mes", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "Trimestre del Año Fiscal Número", + "OriginalName": "Month Number", + "Name": "Mes Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "Trimestre Fiscal", + "OriginalName": "Day of Week", + "Name": "Día de la semana", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Month", - "Name": "Mes", + "OriginalName": "Day of Week Number", + "Name": "Número de día de la semana", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "Mes Fiscal Número", + "OriginalName": "Fiscal Year", + "Name": "Año Fiscal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month in Quarter Number", - "Name": "Mes Fiscal en Trimestre Número", + "OriginalName": "Fiscal Year Number", + "Name": "Año Fiscal Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week", - "Name": "Día de la semana", + "OriginalName": "Fiscal Year Quarter", + "Name": "Trimestre del año fiscal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week Number", - "Name": "Número de día de la semana", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Trimestre del Año Fiscal Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Fiscal Year Number", - "Name": "Día del Año Fiscal Número", + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", "Description": "", "DisplayFolders": "" }, @@ -507,8 +564,8 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal", - "Name": "Fiscal", + "OriginalName": "Calendar", + "Name": "Solar", "Description": "", "DisplayFolders": "", "Levels": [ @@ -518,14 +575,37 @@ "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Trimestre", + "OriginalName": "Month", + "Name": "Mês", + "Description": "" + }, + { + "OriginalName": "Date", + "Name": "Data", + "Description": "" + } + ] + }, + { + "OriginalName": "Fiscal", + "Name": "Fiscal", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Ano", "Description": "" }, { "OriginalName": "Month", "Name": "Mês", "Description": "" + }, + { + "OriginalName": "Date", + "Name": "Data", + "Description": "" } ] } @@ -539,98 +619,92 @@ "FormatString": null }, { - "OriginalName": "DateKey", - "Name": "DateKey", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Sequential Day Number", - "Name": "Número do Dia Sequencial", + "OriginalName": "Year", + "Name": "Ano", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month", - "Name": "Ano Mês", + "OriginalName": "Year Quarter Number", + "Name": "Ano Trimestre Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month Number", - "Name": "Ano Mês Número", + "OriginalName": "Year Quarter", + "Name": "Ano Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "Ano Fiscal", + "OriginalName": "Quarter", + "Name": "Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Number", - "Name": "Ano Fiscal Número", + "OriginalName": "Year Month", + "Name": "Ano Mês", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "Ano Trimestre Fiscal", + "OriginalName": "Year Month Number", + "Name": "Ano Mês Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "Ano Trimestre Fiscal Número", + "OriginalName": "Month", + "Name": "Mês", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "Trimestre Fiscal", + "OriginalName": "Month Number", + "Name": "Mês Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Month", - "Name": "Mês", + "OriginalName": "Day of Week", + "Name": "Dia da Semana", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "Mês Fiscal Número", + "OriginalName": "Day of Week Number", + "Name": "Dia da Semana Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month in Quarter Number", - "Name": "Mês Fiscal no Trimestre Número", + "OriginalName": "Fiscal Year", + "Name": "Ano Fiscal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week", - "Name": "Dia da Semana", + "OriginalName": "Fiscal Year Number", + "Name": "Ano Fiscal Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week Number", - "Name": "Dia da Semana Número", + "OriginalName": "Fiscal Year Quarter", + "Name": "Ano Trimestre Fiscal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Month Number", - "Name": "Dia do Mês Número", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Ano Trimestre Fiscal Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Fiscal Year Number", - "Name": "Dia do Ano Fiscal Número", + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", "Description": "", "DisplayFolders": "" }, @@ -675,8 +749,8 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal", - "Name": "Fiskalisch", + "OriginalName": "Calendar", + "Name": "Kalender", "Description": "", "DisplayFolders": "", "Levels": [ @@ -686,14 +760,37 @@ "Description": "" }, { - "OriginalName": "Quarter", - "Name": "Quartal", + "OriginalName": "Month", + "Name": "Monat", + "Description": "" + }, + { + "OriginalName": "Date", + "Name": "Datum", + "Description": "" + } + ] + }, + { + "OriginalName": "Fiscal", + "Name": "Fiskalisch", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Jahr", "Description": "" }, { "OriginalName": "Month", "Name": "Monat", "Description": "" + }, + { + "OriginalName": "Date", + "Name": "Datum", + "Description": "" } ] } @@ -707,98 +804,92 @@ "FormatString": null }, { - "OriginalName": "DateKey", - "Name": "DatumKey", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Sequential Day Number", - "Name": "Laufende Tagesnummer", + "OriginalName": "Year", + "Name": "Jahr", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month", - "Name": "Jahr Monat", + "OriginalName": "Year Quarter Number", + "Name": "Jahr Quartal Nummer", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month Number", - "Name": "Jahr Monat Nummer", + "OriginalName": "Year Quarter", + "Name": "Jahr Quartal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "Fiskaljahr", + "OriginalName": "Quarter", + "Name": "Quartal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Number", - "Name": "Geschäftsjahresnummer", + "OriginalName": "Year Month", + "Name": "Jahr Monat", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "Geschäftsjahresquartal", + "OriginalName": "Year Month Number", + "Name": "Jahr Monat Nummer", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "Quartalsnummer des Geschäftsjahres", + "OriginalName": "Month", + "Name": "Monat", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "Geschäftsquartal", + "OriginalName": "Month Number", + "Name": "Monat Nummer", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Month", - "Name": "Monat", + "OriginalName": "Day of Week", + "Name": "Wochentag", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "Geschäftsmonatsnummer", + "OriginalName": "Day of Week Number", + "Name": "Wochentagnummer", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month in Quarter Number", - "Name": "Geschäftsjahr im Quartal Nummer", + "OriginalName": "Fiscal Year", + "Name": "Fiskaljahr", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week", - "Name": "Wochentag", + "OriginalName": "Fiscal Year Number", + "Name": "Geschäftsjahresnummer", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week Number", - "Name": "Wochentagnummer", + "OriginalName": "Fiscal Year Quarter", + "Name": "Geschäftsjahresquartal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Month Number", - "Name": "Tag des Monats Nummer", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Quartalsnummer des Geschäftsjahres", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Fiscal Year Number", - "Name": "Tag der Geschäftsjahresnummer", + "OriginalName": "Fiscal Quarter", + "Name": "Geschäftsquartal", "Description": "", "DisplayFolders": "" }, @@ -843,8 +934,8 @@ }, "Hierarchies": [ { - "OriginalName": "Fiscal", - "Name": "财政", + "OriginalName": "Calendar", + "Name": "日历", "Description": "", "DisplayFolders": "", "Levels": [ @@ -854,14 +945,37 @@ "Description": "" }, { - "OriginalName": "Quarter", - "Name": "季度", + "OriginalName": "Month", + "Name": "月份名称", + "Description": "" + }, + { + "OriginalName": "Date", + "Name": "日期", + "Description": "" + } + ] + }, + { + "OriginalName": "Fiscal", + "Name": "财政", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "年份", "Description": "" }, { "OriginalName": "Month", "Name": "月份名称", "Description": "" + }, + { + "OriginalName": "Date", + "Name": "日期", + "Description": "" } ] } @@ -875,98 +989,92 @@ "FormatString": null }, { - "OriginalName": "DateKey", - "Name": "日期键", + "OriginalName": "Year", + "Name": "年份", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Sequential Day Number", - "Name": "全局日期序号", + "OriginalName": "Year Quarter Number", + "Name": "年季数", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month", - "Name": "年月名称", + "OriginalName": "Year Quarter", + "Name": "年季名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Year Month Number", - "Name": "年月数", + "OriginalName": "Quarter", + "Name": "季度名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "财政年份名称", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Fiscal Year Number", - "Name": "财政年份数", + "OriginalName": "Year Month", + "Name": "年月名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "财政年季名称", + "OriginalName": "Year Month Number", + "Name": "年月数", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "财政年季数", + "OriginalName": "Month", + "Name": "月份名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "财政季度名称", + "OriginalName": "Month Number", + "Name": "月份数", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Month", - "Name": "月份名称", + "OriginalName": "Day of Week", + "Name": "周内日", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "财政月份数", + "OriginalName": "Day of Week Number", + "Name": "周内日序号", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month in Quarter Number", - "Name": "当前财政季度中的财政月份数", + "OriginalName": "Fiscal Year", + "Name": "财政年份名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week", - "Name": "周内日", + "OriginalName": "Fiscal Year Number", + "Name": "财政年份数", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Week Number", - "Name": "周内日序号", + "OriginalName": "Fiscal Year Quarter", + "Name": "财政年季名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Month Number", - "Name": "当前月份下日期序号", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "财政年季数", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Day of Fiscal Year Number", - "Name": "当前财政年度下日期序号", + "OriginalName": "Fiscal Quarter", + "Name": "财政季度名称", "Description": "", "DisplayFolders": "" }, diff --git a/src/Dax.Template.TestUI/Templates/DateLocalization-04.json b/src/Dax.Template.TestUI/Templates/DateLocalization-04.json index 8493fa5..43a075f 100644 --- a/src/Dax.Template.TestUI/Templates/DateLocalization-04.json +++ b/src/Dax.Template.TestUI/Templates/DateLocalization-04.json @@ -9,8 +9,8 @@ }, "Hierarchies": [ { - "OriginalName": "Year-Month-Week", - "Name": "Anno-Mese-Settimana", + "OriginalName": "Calendar", + "Name": "Solare", "Description": "", "DisplayFolders": "", "Levels": [ @@ -25,15 +25,15 @@ "Description": "" }, { - "OriginalName": "Week", - "Name": "Settimana", + "OriginalName": "Date", + "Name": "Data", "Description": "" } ] }, { - "OriginalName": "Year-Quarter-Month-Week", - "Name": "Anno-Trimestre-Mese-Settimana", + "OriginalName": "Fiscal", + "Name": "Fiscale", "Description": "", "DisplayFolders": "", "Levels": [ @@ -42,60 +42,14 @@ "Name": "Anno", "Description": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, { "OriginalName": "Month", "Name": "Mese", "Description": "" }, { - "OriginalName": "Week", - "Name": "Settimana", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter-Week", - "Name": "Anno-Trimestre-Settimana", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Anno", - "Description": "" - }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "Settimana", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Week", - "Name": "Anno-Settimana", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Anno", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "Settimana", + "OriginalName": "Date", + "Name": "Data", "Description": "" } ] @@ -107,95 +61,95 @@ "Name": "Data", "Description": "", "DisplayFolders": "", - "FormatString": "dd/mm/yyyy" + "FormatString": null }, { - "OriginalName": "Sequential Day Number", - "Name": "Numero giorno sequenziale", + "OriginalName": "Year", + "Name": "Anno", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "Anno Fiscale", + "OriginalName": "Year Quarter Number", + "Name": "Anno Trimestre Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Number", - "Name": "Anno Fiscale Numero", + "OriginalName": "Year Quarter", + "Name": "Anno Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "Anno Trimestre Fiscale", + "OriginalName": "Quarter", + "Name": "Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "Anno Trimestre Fiscale Numero", + "OriginalName": "Year Month", + "Name": "Anno Mese", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "Trimestre Fiscale", + "OriginalName": "Year Month Number", + "Name": "Anno Mese Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter Number", - "Name": "Trimestre Fiscale Numero", + "OriginalName": "Month", + "Name": "Mese", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month", - "Name": "Anno Mese Fiscale", + "OriginalName": "Month Number", + "Name": "Mese Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month Number", - "Name": "Anno Mese Fiscale Numero", + "OriginalName": "Day of Week", + "Name": "Giorno Settimana", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month", - "Name": "Mese Fiscale", + "OriginalName": "Day of Week Number", + "Name": "Giorno Settimana Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "Mese Fiscale Numero", + "OriginalName": "Fiscal Year", + "Name": "Anno Fiscale", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week", - "Name": "Settimana Fiscale", + "OriginalName": "Fiscal Year Number", + "Name": "Anno Fiscale Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week Number", - "Name": "Settimana Fiscale Numero", + "OriginalName": "Fiscal Year Quarter", + "Name": "Anno Trimestre Fiscale", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week", - "Name": "Anno Settimana Fiscale", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Anno Trimestre Fiscale Numero", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week Number", - "Name": "Anno Settimana Fiscale Numero", + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscale", "Description": "", "DisplayFolders": "" }, @@ -223,36 +177,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Day of Week", - "Name": "Giorno Settimana", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Week Number", - "Name": "Giorno Settimana Numero", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Month Number", - "Name": "Giorno Mese Fiscale Numero", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Quarter Number", - "Name": "Giorno Trimestre Fiscale Numero", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Year Number", - "Name": "Giorno Anno Fiscale Numero", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "DateWithTransactions", "Name": "DataConTransazioni", @@ -270,8 +194,8 @@ }, "Hierarchies": [ { - "OriginalName": "Year-Month-Week", - "Name": "Année-Mois-Semaine", + "OriginalName": "Calendar", + "Name": "Solaire", "Description": "", "DisplayFolders": "", "Levels": [ @@ -286,15 +210,15 @@ "Description": "" }, { - "OriginalName": "Week", - "Name": "Semaine", + "OriginalName": "Date", + "Name": "Date", "Description": "" } ] }, { - "OriginalName": "Year-Quarter-Month-Week", - "Name": "Année-Trimestre-Mois-Semaine", + "OriginalName": "Fiscal", + "Name": "Fiscal", "Description": "", "DisplayFolders": "", "Levels": [ @@ -303,60 +227,14 @@ "Name": "An", "Description": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, { "OriginalName": "Month", "Name": "Mois", "Description": "" }, { - "OriginalName": "Week", - "Name": "Semaine", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter-Week", - "Name": "Année-Trimestre-Semaine", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "An", - "Description": "" - }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "Semaine", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Week", - "Name": "Année-Semaine", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "An", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "Semaine", + "OriginalName": "Date", + "Name": "Date", "Description": "" } ] @@ -371,92 +249,92 @@ "FormatString": null }, { - "OriginalName": "Sequential Day Number", - "Name": "Numéro de jour séquentiel", + "OriginalName": "Year", + "Name": "An", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "Exercice Fiscal", + "OriginalName": "Year Quarter Number", + "Name": "Année Trimestre Numéro", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Number", - "Name": "Exercice Fiscal Numéro", + "OriginalName": "Year Quarter", + "Name": "Année Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "Anno Trimestre Fiscale", + "OriginalName": "Quarter", + "Name": "Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "Exercice Fiscal Trimestre", + "OriginalName": "Year Month", + "Name": "Année Mois", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "Trimestre Fiscal", + "OriginalName": "Year Month Number", + "Name": "Année Mois Numéro", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter Number", - "Name": "Trimestre Fiscal Numéro", + "OriginalName": "Month", + "Name": "Mois", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month", - "Name": "Exercice Fiscal Mois", + "OriginalName": "Month Number", + "Name": "Mois Numéro", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month Number", - "Name": "Exercice Fiscal Mois Numéro", + "OriginalName": "Day of Week", + "Name": "Jour de la Semaine", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month", - "Name": "Mois Fiscal", + "OriginalName": "Day of Week Number", + "Name": "Jour de la Semaine Numéro", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "Mois Fiscal Numéro", + "OriginalName": "Fiscal Year", + "Name": "Exercice Fiscal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week", - "Name": "Semaine Fiscale", + "OriginalName": "Fiscal Year Number", + "Name": "Exercice Fiscal Numéro", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week Number", - "Name": "Semaine Fiscale Numéro", + "OriginalName": "Fiscal Year Quarter", + "Name": "Anno Trimestre Fiscale", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week", - "Name": "Exercice Fiscal Semaine", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Exercice Fiscal Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week Number", - "Name": "Exercice Fiscal Semaine Numéro", + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", "Description": "", "DisplayFolders": "" }, @@ -484,36 +362,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Day of Week", - "Name": "Jour de la Semaine", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Week Number", - "Name": "Jour de la Semaine Numéro", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Month Number", - "Name": "Jour du Mois Fiscal Numéro", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Quarter Number", - "Name": "Jour du Trimestre Fiscal Numéro", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Year Number", - "Name": "Jour de l'Année Fiscale Numéro", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "DateWithTransactions", "Name": "DateAvecTransactions", @@ -531,8 +379,8 @@ }, "Hierarchies": [ { - "OriginalName": "Year-Month-Week", - "Name": "Año-Mes-Semana", + "OriginalName": "Calendar", + "Name": "Solar", "Description": "", "DisplayFolders": "", "Levels": [ @@ -547,15 +395,15 @@ "Description": "" }, { - "OriginalName": "Week", - "Name": "Semana", + "OriginalName": "Date", + "Name": "Fecha", "Description": "" } ] }, { - "OriginalName": "Year-Quarter-Month-Week", - "Name": "Año-Trimestre-Mes-Semana", + "OriginalName": "Fiscal", + "Name": "Fiscal", "Description": "", "DisplayFolders": "", "Levels": [ @@ -564,60 +412,14 @@ "Name": "Año", "Description": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, { "OriginalName": "Month", "Name": "Mes", "Description": "" }, { - "OriginalName": "Week", - "Name": "Semana", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter-Week", - "Name": "Año-Trimestre-Semana", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Año", - "Description": "" - }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "Semana", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Week", - "Name": "Año-Semana", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Año", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "Semana", + "OriginalName": "Date", + "Name": "Fecha", "Description": "" } ] @@ -632,92 +434,92 @@ "FormatString": null }, { - "OriginalName": "Sequential Day Number", - "Name": "Número de día secuencial", + "OriginalName": "Year", + "Name": "Año", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "Año Fiscal", + "OriginalName": "Year Quarter Number", + "Name": "Año Trimestre Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Number", - "Name": "Año Fiscal Número", + "OriginalName": "Year Quarter", + "Name": "Año Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "Trimestre del año fiscal", + "OriginalName": "Quarter", + "Name": "Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "Trimestre del Año Fiscal Número", + "OriginalName": "Year Month", + "Name": "Año Mes", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "Trimestre Fiscal", + "OriginalName": "Year Month Number", + "Name": "Año Mes Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter Number", - "Name": "Trimestre Fiscal Número", + "OriginalName": "Month", + "Name": "Mes", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month", - "Name": "Año Fiscal Mes", + "OriginalName": "Month Number", + "Name": "Mes Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month Number", - "Name": "Año Fiscal Mes Número", + "OriginalName": "Day of Week", + "Name": "Día de la semana", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month", - "Name": "Mes Fiscal", + "OriginalName": "Day of Week Number", + "Name": "Número de día de la semana", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "Mes Fiscal Número", + "OriginalName": "Fiscal Year", + "Name": "Año Fiscal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week", - "Name": "Semana Fiscal", + "OriginalName": "Fiscal Year Number", + "Name": "Año Fiscal Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week Number", - "Name": "Semana Fiscal Número", + "OriginalName": "Fiscal Year Quarter", + "Name": "Trimestre del año fiscal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week", - "Name": "Semana del Año Fiscal", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Trimestre del Año Fiscal Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week Number", - "Name": "Semana del Año Fiscal Número", + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", "Description": "", "DisplayFolders": "" }, @@ -745,36 +547,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Day of Week", - "Name": "Día de la semana", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Week Number", - "Name": "Número de día de la semana", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Month Number", - "Name": "Día del Mes Fiscal Numero", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Quarter Number", - "Name": "Día del Trimestre Fiscal Número", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Year Number", - "Name": "Día del Año Fiscal Número", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "DateWithTransactions", "Name": "FechaConTransacciones", @@ -792,8 +564,8 @@ }, "Hierarchies": [ { - "OriginalName": "Year-Month-Week", - "Name": "Ano-Mês-Semana", + "OriginalName": "Calendar", + "Name": "Solar", "Description": "", "DisplayFolders": "", "Levels": [ @@ -808,15 +580,15 @@ "Description": "" }, { - "OriginalName": "Week", - "Name": "Semana", + "OriginalName": "Date", + "Name": "Data", "Description": "" } ] }, { - "OriginalName": "Year-Quarter-Month-Week", - "Name": "Ano-Trimestre-Mês-Semana", + "OriginalName": "Fiscal", + "Name": "Fiscal", "Description": "", "DisplayFolders": "", "Levels": [ @@ -825,60 +597,14 @@ "Name": "Ano", "Description": "" }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, { "OriginalName": "Month", "Name": "Mês", "Description": "" }, { - "OriginalName": "Week", - "Name": "Semana", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter-Week", - "Name": "Ano-Trimestre-Semana", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Ano", - "Description": "" - }, - { - "OriginalName": "Quarter", - "Name": "Trimestre", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "Semana", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Week", - "Name": "Ano-Semana", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Ano", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "Semana", + "OriginalName": "Date", + "Name": "Data", "Description": "" } ] @@ -893,92 +619,92 @@ "FormatString": null }, { - "OriginalName": "Sequential Day Number", - "Name": "Número do Dia Sequencial", + "OriginalName": "Year", + "Name": "Ano", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "Ano Fiscal", + "OriginalName": "Year Quarter Number", + "Name": "Ano Trimestre Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Number", - "Name": "Ano Fiscal Número", + "OriginalName": "Year Quarter", + "Name": "Ano Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "Ano Trimestre Fiscal", + "OriginalName": "Quarter", + "Name": "Trimestre", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "Ano Trimestre Fiscal Número", + "OriginalName": "Year Month", + "Name": "Ano Mês", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "Trimestre Fiscal", + "OriginalName": "Year Month Number", + "Name": "Ano Mês Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter Number", - "Name": "Trimestre Fiscal Número", + "OriginalName": "Month", + "Name": "Mês", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month", - "Name": "Ano Mês Fiscal", + "OriginalName": "Month Number", + "Name": "Mês Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month Number", - "Name": "Ano Mês Fiscal Número", + "OriginalName": "Day of Week", + "Name": "Dia da Semana", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month", - "Name": "Mês Fiscal", + "OriginalName": "Day of Week Number", + "Name": "Dia da Semana Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "Mês Fiscal Número", + "OriginalName": "Fiscal Year", + "Name": "Ano Fiscal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week", - "Name": "Semana Fiscal", + "OriginalName": "Fiscal Year Number", + "Name": "Ano Fiscal Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week Number", - "Name": "Semana Fiscal Número", + "OriginalName": "Fiscal Year Quarter", + "Name": "Ano Trimestre Fiscal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week", - "Name": "Ano Semana Fiscal", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Ano Trimestre Fiscal Número", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week Number", - "Name": "Ano Semana Fiscal Número", + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", "Description": "", "DisplayFolders": "" }, @@ -1006,36 +732,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Day of Week", - "Name": "Dia da Semana", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Week Number", - "Name": "Dia da Semana Número", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Month Number", - "Name": "Dia do Mês Fiscal Número", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Quarter Number", - "Name": "Dia do Trimestre Fiscal Número", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Year Number", - "Name": "Dia do Ano Fiscal Número", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "DateWithTransactions", "Name": "DataComTransações", @@ -1053,8 +749,8 @@ }, "Hierarchies": [ { - "OriginalName": "Year-Month-Week", - "Name": "Jahr-Monat-Woche", + "OriginalName": "Calendar", + "Name": "Kalender", "Description": "", "DisplayFolders": "", "Levels": [ @@ -1069,15 +765,15 @@ "Description": "" }, { - "OriginalName": "Week", - "Name": "Woche", + "OriginalName": "Date", + "Name": "Datum", "Description": "" } ] }, { - "OriginalName": "Year-Quarter-Month-Week", - "Name": "Jahr-Quartal-Monat-Woche", + "OriginalName": "Fiscal", + "Name": "Fiskalisch", "Description": "", "DisplayFolders": "", "Levels": [ @@ -1086,60 +782,14 @@ "Name": "Jahr", "Description": "" }, - { - "OriginalName": "Quarter", - "Name": "Quartal", - "Description": "" - }, { "OriginalName": "Month", "Name": "Monat", "Description": "" }, { - "OriginalName": "Week", - "Name": "Woche", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter-Week", - "Name": "Jahr-Quartal-Woche", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Jahr", - "Description": "" - }, - { - "OriginalName": "Quarter", - "Name": "Quartal", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "Woche", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Week", - "Name": "Jahr-Woche", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "Jahr", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "Woche", + "OriginalName": "Date", + "Name": "Datum", "Description": "" } ] @@ -1151,95 +801,95 @@ "Name": "Datum", "Description": "", "DisplayFolders": "", - "FormatString": "dd/mm/yyyy" + "FormatString": null }, { - "OriginalName": "Sequential Day Number", - "Name": "Laufende Tagesnummer", + "OriginalName": "Year", + "Name": "Jahr", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "Fiskaljahr", + "OriginalName": "Year Quarter Number", + "Name": "Jahr Quartal Nummer", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Number", - "Name": "Geschäftsjahresnummer", + "OriginalName": "Year Quarter", + "Name": "Jahr Quartal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "Geschäftsjahresquartal", + "OriginalName": "Quarter", + "Name": "Quartal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "Quartalsnummer des Geschäftsjahres", + "OriginalName": "Year Month", + "Name": "Jahr Monat", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "Geschäftsquartal", + "OriginalName": "Year Month Number", + "Name": "Jahr Monat Nummer", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter Number", - "Name": "Nummer des Geschäftsquartals", + "OriginalName": "Month", + "Name": "Monat", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month", - "Name": "Geschäftsjahr Monat", + "OriginalName": "Month Number", + "Name": "Monat Nummer", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month Number", - "Name": "Nummer des Monats des Geschäftsjahres", + "OriginalName": "Day of Week", + "Name": "Wochentag", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month", - "Name": "Geschäftsmonat", + "OriginalName": "Day of Week Number", + "Name": "Wochentagnummer", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "Geschäftsmonat Nummer", + "OriginalName": "Fiscal Year", + "Name": "Fiskaljahr", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week", - "Name": "Geschäftswoche", + "OriginalName": "Fiscal Year Number", + "Name": "Geschäftsjahresnummer", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week Number", - "Name": "Nummer der Geschäftswoche", + "OriginalName": "Fiscal Year Quarter", + "Name": "Geschäftsjahresquartal", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week", - "Name": "Geschäftsjahr Woche", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Quartalsnummer des Geschäftsjahres", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week Number", - "Name": "Nummer der Geschäftsjahr Woche", + "OriginalName": "Fiscal Quarter", + "Name": "Geschäftsquartal", "Description": "", "DisplayFolders": "" }, @@ -1267,36 +917,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Day of Week", - "Name": "Wochentag", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Week Number", - "Name": "Wochentagnummer", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Month Number", - "Name": "Tag der Nummer des Geschäftsjahres", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Quarter Number", - "Name": "Tag der Nummer des Geschäftsquartals", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Year Number", - "Name": "Tag der Geschäftsjahresnummer", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "DateWithTransactions", "Name": "DatumMitTransaktionen", @@ -1314,93 +934,47 @@ }, "Hierarchies": [ { - "OriginalName": "Year-Month-Week", - "Name": "年-月-周", + "OriginalName": "Calendar", + "Name": "日历", "Description": "", "DisplayFolders": "", "Levels": [ { "OriginalName": "Year", - "Name": "年", + "Name": "年份", "Description": "" }, { "OriginalName": "Month", - "Name": "月", + "Name": "月份名称", "Description": "" }, { - "OriginalName": "Week", - "Name": "周", + "OriginalName": "Date", + "Name": "日期", "Description": "" } ] }, { - "OriginalName": "Year-Quarter-Month-Week", - "Name": "年-季-月-周", + "OriginalName": "Fiscal", + "Name": "财政", "Description": "", "DisplayFolders": "", "Levels": [ { "OriginalName": "Year", - "Name": "年", - "Description": "" - }, - { - "OriginalName": "Quarter", - "Name": "季", + "Name": "年份", "Description": "" }, { "OriginalName": "Month", - "Name": "月", + "Name": "月份名称", "Description": "" }, { - "OriginalName": "Week", - "Name": "周", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Quarter-Week", - "Name": "年-季-周", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "年", - "Description": "" - }, - { - "OriginalName": "Quarter", - "Name": "季", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "周", - "Description": "" - } - ] - }, - { - "OriginalName": "Year-Week", - "Name": "年周", - "Description": "", - "DisplayFolders": "", - "Levels": [ - { - "OriginalName": "Year", - "Name": "年", - "Description": "" - }, - { - "OriginalName": "Week", - "Name": "周", + "OriginalName": "Date", + "Name": "日期", "Description": "" } ] @@ -1412,95 +986,95 @@ "Name": "日期", "Description": "", "DisplayFolders": "", - "FormatString": "dd/mm/yyyy" + "FormatString": null }, { - "OriginalName": "Sequential Day Number", - "Name": "全局日期序号", + "OriginalName": "Year", + "Name": "年份", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year", - "Name": "财政年份名称", + "OriginalName": "Year Quarter Number", + "Name": "年季数", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Number", - "Name": "财政年份数", + "OriginalName": "Year Quarter", + "Name": "年季名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter", - "Name": "财政年季名称", + "OriginalName": "Quarter", + "Name": "季度名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Quarter Number", - "Name": "财政年季数", + "OriginalName": "Year Month", + "Name": "年月名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter", - "Name": "财政季度名称", + "OriginalName": "Year Month Number", + "Name": "年月数", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Quarter Number", - "Name": "财政季度数", + "OriginalName": "Month", + "Name": "月份名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month", - "Name": "财政年月名称", + "OriginalName": "Month Number", + "Name": "月份数", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Month Number", - "Name": "财政年月数", + "OriginalName": "Day of Week", + "Name": "周内日", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month", - "Name": "财政月份名称", + "OriginalName": "Day of Week Number", + "Name": "周内日序号", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Month Number", - "Name": "财政月份数", + "OriginalName": "Fiscal Year", + "Name": "财政年份名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week", - "Name": "财政周名称", + "OriginalName": "Fiscal Year Number", + "Name": "财政年份数", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Week Number", - "Name": "财政周数", + "OriginalName": "Fiscal Year Quarter", + "Name": "财政年季名称", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week", - "Name": "财政年周名称", + "OriginalName": "Fiscal Year Quarter Number", + "Name": "财政年季数", "Description": "", "DisplayFolders": "" }, { - "OriginalName": "Fiscal Year Week Number", - "Name": "财政年周数", + "OriginalName": "Fiscal Quarter", + "Name": "财政季度名称", "Description": "", "DisplayFolders": "" }, @@ -1528,36 +1102,6 @@ "Description": "", "DisplayFolders": "" }, - { - "OriginalName": "Day of Week", - "Name": "周内日", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Week Number", - "Name": "周内日序号", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Month Number", - "Name": "当前财政月份下日期序号", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Quarter Number", - "Name": "当前财政季度下日期序号", - "Description": "", - "DisplayFolders": "" - }, - { - "OriginalName": "Day of Fiscal Year Number", - "Name": "当前财政年度下日期序号", - "Description": "", - "DisplayFolders": "" - }, { "OriginalName": "DateWithTransactions", "Name": "交易日", diff --git a/src/Dax.Template.TestUI/Templates/DateLocalization-05.json b/src/Dax.Template.TestUI/Templates/DateLocalization-05.json new file mode 100644 index 0000000..f1c5ff1 --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/DateLocalization-05.json @@ -0,0 +1,1006 @@ +{ + "Translations": [ + { + "Iso": "it", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "Fiscale", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Anno", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mese", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Data", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "DateKey", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Numero giorno sequenziale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "Anno Mese", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "Anno Mese Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Anno Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Anno Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Anno Trimestre Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Anno Trimestre Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "Mese", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mese Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "Mese Fiscale in Trimestre Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Giorno Settimana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Giorno Settimana Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Month Number", + "Name": "Giorno Mese Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Giorno Anno Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Giorno Lavorativo", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "Lavorativo", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Giorno Lavorativo Valore", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Festività", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DataConTransazioni", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "fr", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "Fiscal", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "An", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mois", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Date", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "DateKey", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Numéro de jour séquentiel", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "Année Mois", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "Année Mois Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Exercice Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Exercice Fiscal Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Anno Trimestre Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Exercice Fiscal Trimestre", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "Mois", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mois Fiscal Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "Mois Fiscal en Trimestre Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Giorno Settimana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Jour de la Semaine", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Jour de la Semaine Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Jour de l'Année Fiscale Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Jour Ouvrable", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "Travaille", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Jour Ouvrable Valeur", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Festivité", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DateAvecTransactions", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "es", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "Fiscal", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Año", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mes", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Fecha", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "DateKey", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Número de día secuencial", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "Año Mes", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "Año Mes Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Año Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Año Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Trimestre del año fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Trimestre del Año Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "Mes", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mes Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "Mes Fiscal en Trimestre Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Día de la semana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Número de día de la semana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Día del Año Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Día de trabajo", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "EstáTrabajando", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Valor del día laborable", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Vacaciones", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "FechaConTransacciones", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "pt", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "Fiscal", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Ano", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mês", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Data", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "DateKey", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Número do Dia Sequencial", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "Ano Mês", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "Ano Mês Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Ano Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Ano Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Ano Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Ano Trimestre Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "Mês", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mês Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "Mês Fiscal no Trimestre Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Dia da Semana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Dia da Semana Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Month Number", + "Name": "Dia do Mês Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Dia do Ano Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Dia de Trabalho", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "ÉDiaDeTrabalho", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Dia de Trabalho Valor", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Festividade", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DataComTransações", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "de", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "Fiskalisch", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Jahr", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Quartal", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Monat", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Datum", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "DatumKey", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Laufende Tagesnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "Jahr Monat", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "Jahr Monat Nummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Fiskaljahr", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Geschäftsjahresnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Geschäftsjahresquartal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Quartalsnummer des Geschäftsjahres", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Geschäftsquartal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "Monat", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Geschäftsmonatsnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "Geschäftsjahr im Quartal Nummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Wochentag", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Wochentagnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Month Number", + "Name": "Tag des Monats Nummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Tag der Geschäftsjahresnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Arbeitstag", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "IstArbeitstag", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Arbeitstag Wert", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Feiertagsname", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DatumMitTransaktionen", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "zh", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "财政", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "年份", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "季度", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "月份名称", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "日期", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "日期键", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "全局日期序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "年月名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "年月数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "财政年份名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "财政年份数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "财政年季名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "财政年季数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "财政季度名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "月份名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "财政月份数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "当前财政季度中的财政月份数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "周内日", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "周内日序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Month Number", + "Name": "当前月份下日期序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "当前财政年度下日期序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "工作日", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "是否工作", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "工作日标记", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "假期名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "交易日", + "Description": "", + "DisplayFolders": "" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/DateLocalization-06.json b/src/Dax.Template.TestUI/Templates/DateLocalization-06.json new file mode 100644 index 0000000..f1c5ff1 --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/DateLocalization-06.json @@ -0,0 +1,1006 @@ +{ + "Translations": [ + { + "Iso": "it", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "Fiscale", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Anno", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mese", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Data", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "DateKey", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Numero giorno sequenziale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "Anno Mese", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "Anno Mese Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Anno Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Anno Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Anno Trimestre Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Anno Trimestre Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "Mese", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mese Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "Mese Fiscale in Trimestre Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Giorno Settimana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Giorno Settimana Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Month Number", + "Name": "Giorno Mese Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Giorno Anno Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Giorno Lavorativo", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "Lavorativo", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Giorno Lavorativo Valore", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Festività", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DataConTransazioni", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "fr", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "Fiscal", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "An", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mois", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Date", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "DateKey", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Numéro de jour séquentiel", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "Année Mois", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "Année Mois Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Exercice Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Exercice Fiscal Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Anno Trimestre Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Exercice Fiscal Trimestre", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "Mois", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mois Fiscal Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "Mois Fiscal en Trimestre Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Giorno Settimana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Jour de la Semaine", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Jour de la Semaine Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Jour de l'Année Fiscale Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Jour Ouvrable", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "Travaille", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Jour Ouvrable Valeur", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Festivité", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DateAvecTransactions", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "es", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "Fiscal", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Año", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mes", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Fecha", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "DateKey", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Número de día secuencial", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "Año Mes", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "Año Mes Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Año Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Año Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Trimestre del año fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Trimestre del Año Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "Mes", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mes Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "Mes Fiscal en Trimestre Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Día de la semana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Número de día de la semana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Día del Año Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Día de trabajo", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "EstáTrabajando", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Valor del día laborable", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Vacaciones", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "FechaConTransacciones", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "pt", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "Fiscal", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Ano", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mês", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Data", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "DateKey", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Número do Dia Sequencial", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "Ano Mês", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "Ano Mês Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Ano Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Ano Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Ano Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Ano Trimestre Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "Mês", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mês Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "Mês Fiscal no Trimestre Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Dia da Semana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Dia da Semana Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Month Number", + "Name": "Dia do Mês Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Dia do Ano Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Dia de Trabalho", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "ÉDiaDeTrabalho", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Dia de Trabalho Valor", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Festividade", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DataComTransações", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "de", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "Fiskalisch", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Jahr", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Quartal", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Monat", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Datum", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "DatumKey", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Laufende Tagesnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "Jahr Monat", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "Jahr Monat Nummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Fiskaljahr", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Geschäftsjahresnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Geschäftsjahresquartal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Quartalsnummer des Geschäftsjahres", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Geschäftsquartal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "Monat", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Geschäftsmonatsnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "Geschäftsjahr im Quartal Nummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Wochentag", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Wochentagnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Month Number", + "Name": "Tag des Monats Nummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Tag der Geschäftsjahresnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Arbeitstag", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "IstArbeitstag", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Arbeitstag Wert", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Feiertagsname", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DatumMitTransaktionen", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "zh", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Fiscal", + "Name": "财政", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "年份", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "季度", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "月份名称", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "日期", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "DateKey", + "Name": "日期键", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "全局日期序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month", + "Name": "年月名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Year Month Number", + "Name": "年月数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "财政年份名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "财政年份数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "财政年季名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "财政年季数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "财政季度名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Month", + "Name": "月份名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "财政月份数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month in Quarter Number", + "Name": "当前财政季度中的财政月份数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "周内日", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "周内日序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Month Number", + "Name": "当前月份下日期序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "当前财政年度下日期序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "工作日", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "是否工作", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "工作日标记", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "假期名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "交易日", + "Description": "", + "DisplayFolders": "" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/DateLocalization-07.json b/src/Dax.Template.TestUI/Templates/DateLocalization-07.json new file mode 100644 index 0000000..8493fa5 --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/DateLocalization-07.json @@ -0,0 +1,1570 @@ +{ + "Translations": [ + { + "Iso": "it", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Year-Month-Week", + "Name": "Anno-Mese-Settimana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Anno", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mese", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Settimana", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Month-Week", + "Name": "Anno-Trimestre-Mese-Settimana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Anno", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mese", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Settimana", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Week", + "Name": "Anno-Trimestre-Settimana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Anno", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Settimana", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Week", + "Name": "Anno-Settimana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Anno", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Settimana", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Data", + "Description": "", + "DisplayFolders": "", + "FormatString": "dd/mm/yyyy" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Numero giorno sequenziale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Anno Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Anno Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Anno Trimestre Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Anno Trimestre Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter Number", + "Name": "Trimestre Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month", + "Name": "Anno Mese Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month Number", + "Name": "Anno Mese Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month", + "Name": "Mese Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mese Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week", + "Name": "Settimana Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week Number", + "Name": "Settimana Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week", + "Name": "Anno Settimana Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week Number", + "Name": "Anno Settimana Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Giorno Lavorativo", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "Lavorativo", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Giorno Lavorativo Valore", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Festività", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Giorno Settimana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Giorno Settimana Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Month Number", + "Name": "Giorno Mese Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Quarter Number", + "Name": "Giorno Trimestre Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Giorno Anno Fiscale Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DataConTransazioni", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "fr", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Year-Month-Week", + "Name": "Année-Mois-Semaine", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "An", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mois", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semaine", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Month-Week", + "Name": "Année-Trimestre-Mois-Semaine", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "An", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mois", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semaine", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Week", + "Name": "Année-Trimestre-Semaine", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "An", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semaine", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Week", + "Name": "Année-Semaine", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "An", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semaine", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Date", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Numéro de jour séquentiel", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Exercice Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Exercice Fiscal Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Anno Trimestre Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Exercice Fiscal Trimestre", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter Number", + "Name": "Trimestre Fiscal Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month", + "Name": "Exercice Fiscal Mois", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month Number", + "Name": "Exercice Fiscal Mois Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month", + "Name": "Mois Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mois Fiscal Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week", + "Name": "Semaine Fiscale", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week Number", + "Name": "Semaine Fiscale Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week", + "Name": "Exercice Fiscal Semaine", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week Number", + "Name": "Exercice Fiscal Semaine Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Jour Ouvrable", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "Travaille", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Jour Ouvrable Valeur", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Festivité", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Jour de la Semaine", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Jour de la Semaine Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Month Number", + "Name": "Jour du Mois Fiscal Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Quarter Number", + "Name": "Jour du Trimestre Fiscal Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Jour de l'Année Fiscale Numéro", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DateAvecTransactions", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "es", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Year-Month-Week", + "Name": "Año-Mes-Semana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Año", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mes", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semana", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Month-Week", + "Name": "Año-Trimestre-Mes-Semana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Año", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mes", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semana", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Week", + "Name": "Año-Trimestre-Semana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Año", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semana", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Week", + "Name": "Año-Semana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Año", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semana", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Fecha", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Número de día secuencial", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Año Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Año Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Trimestre del año fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Trimestre del Año Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter Number", + "Name": "Trimestre Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month", + "Name": "Año Fiscal Mes", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month Number", + "Name": "Año Fiscal Mes Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month", + "Name": "Mes Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mes Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week", + "Name": "Semana Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week Number", + "Name": "Semana Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week", + "Name": "Semana del Año Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week Number", + "Name": "Semana del Año Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Día de trabajo", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "EstáTrabajando", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Valor del día laborable", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Vacaciones", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Día de la semana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Número de día de la semana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Month Number", + "Name": "Día del Mes Fiscal Numero", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Quarter Number", + "Name": "Día del Trimestre Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Día del Año Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "FechaConTransacciones", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "pt", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Year-Month-Week", + "Name": "Ano-Mês-Semana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Ano", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mês", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semana", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Month-Week", + "Name": "Ano-Trimestre-Mês-Semana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Ano", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Mês", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semana", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Week", + "Name": "Ano-Trimestre-Semana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Ano", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Trimestre", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semana", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Week", + "Name": "Ano-Semana", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Ano", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Semana", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Data", + "Description": "", + "DisplayFolders": "", + "FormatString": null + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Número do Dia Sequencial", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Ano Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Ano Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Ano Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Ano Trimestre Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Trimestre Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter Number", + "Name": "Trimestre Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month", + "Name": "Ano Mês Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month Number", + "Name": "Ano Mês Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month", + "Name": "Mês Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Mês Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week", + "Name": "Semana Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week Number", + "Name": "Semana Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week", + "Name": "Ano Semana Fiscal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week Number", + "Name": "Ano Semana Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Dia de Trabalho", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "ÉDiaDeTrabalho", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Dia de Trabalho Valor", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Festividade", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Dia da Semana", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Dia da Semana Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Month Number", + "Name": "Dia do Mês Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Quarter Number", + "Name": "Dia do Trimestre Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Dia do Ano Fiscal Número", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DataComTransações", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "de", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Year-Month-Week", + "Name": "Jahr-Monat-Woche", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Jahr", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Monat", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Woche", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Month-Week", + "Name": "Jahr-Quartal-Monat-Woche", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Jahr", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Quartal", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "Monat", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Woche", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Week", + "Name": "Jahr-Quartal-Woche", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Jahr", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "Quartal", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Woche", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Week", + "Name": "Jahr-Woche", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "Jahr", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "Woche", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "Datum", + "Description": "", + "DisplayFolders": "", + "FormatString": "dd/mm/yyyy" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "Laufende Tagesnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "Fiskaljahr", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "Geschäftsjahresnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "Geschäftsjahresquartal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "Quartalsnummer des Geschäftsjahres", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "Geschäftsquartal", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter Number", + "Name": "Nummer des Geschäftsquartals", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month", + "Name": "Geschäftsjahr Monat", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month Number", + "Name": "Nummer des Monats des Geschäftsjahres", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month", + "Name": "Geschäftsmonat", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "Geschäftsmonat Nummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week", + "Name": "Geschäftswoche", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week Number", + "Name": "Nummer der Geschäftswoche", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week", + "Name": "Geschäftsjahr Woche", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week Number", + "Name": "Nummer der Geschäftsjahr Woche", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "Arbeitstag", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "IstArbeitstag", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "Arbeitstag Wert", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "Feiertagsname", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "Wochentag", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "Wochentagnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Month Number", + "Name": "Tag der Nummer des Geschäftsjahres", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Quarter Number", + "Name": "Tag der Nummer des Geschäftsquartals", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "Tag der Geschäftsjahresnummer", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "DatumMitTransaktionen", + "Description": "", + "DisplayFolders": "" + } + ] + }, + { + "Iso": "zh", + "Table": { + "OriginalName": null, + "Name": "", + "Description": "" + }, + "Hierarchies": [ + { + "OriginalName": "Year-Month-Week", + "Name": "年-月-周", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "年", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "月", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "周", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Month-Week", + "Name": "年-季-月-周", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "年", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "季", + "Description": "" + }, + { + "OriginalName": "Month", + "Name": "月", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "周", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Quarter-Week", + "Name": "年-季-周", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "年", + "Description": "" + }, + { + "OriginalName": "Quarter", + "Name": "季", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "周", + "Description": "" + } + ] + }, + { + "OriginalName": "Year-Week", + "Name": "年周", + "Description": "", + "DisplayFolders": "", + "Levels": [ + { + "OriginalName": "Year", + "Name": "年", + "Description": "" + }, + { + "OriginalName": "Week", + "Name": "周", + "Description": "" + } + ] + } + ], + "Columns": [ + { + "OriginalName": "Date", + "Name": "日期", + "Description": "", + "DisplayFolders": "", + "FormatString": "dd/mm/yyyy" + }, + { + "OriginalName": "Sequential Day Number", + "Name": "全局日期序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year", + "Name": "财政年份名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Number", + "Name": "财政年份数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter", + "Name": "财政年季名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Quarter Number", + "Name": "财政年季数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter", + "Name": "财政季度名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Quarter Number", + "Name": "财政季度数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month", + "Name": "财政年月名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Month Number", + "Name": "财政年月数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month", + "Name": "财政月份名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Month Number", + "Name": "财政月份数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week", + "Name": "财政周名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Week Number", + "Name": "财政周数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week", + "Name": "财政年周名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Fiscal Year Week Number", + "Name": "财政年周数", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day", + "Name": "工作日", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "IsWorking", + "Name": "是否工作", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Working Day Value", + "Name": "工作日标记", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Holiday Name", + "Name": "假期名称", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week", + "Name": "周内日", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Week Number", + "Name": "周内日序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Month Number", + "Name": "当前财政月份下日期序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Quarter Number", + "Name": "当前财政季度下日期序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "Day of Fiscal Year Number", + "Name": "当前财政年度下日期序号", + "Description": "", + "DisplayFolders": "" + }, + { + "OriginalName": "DateWithTransactions", + "Name": "交易日", + "Description": "", + "DisplayFolders": "" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/DateTemplate-01.json b/src/Dax.Template.TestUI/Templates/DateTemplate-01.json index ff8ee8a..083df80 100644 --- a/src/Dax.Template.TestUI/Templates/DateTemplate-01.json +++ b/src/Dax.Template.TestUI/Templates/DateTemplate-01.json @@ -1,7 +1,7 @@ { - "_comment": "Reference FY prefix format in DAX expression using the syntax @_FY_@", + "_comment": "Reference Q prefix format in DAX expression using the syntax @_Q_@", "CalendarType": "Calendar", - "FormatPrefixes": [ "Q", "FY", "FQ" ], + "FormatPrefixes": [ "Q" ], "Steps": [ { "Name": "__Calendar", @@ -9,11 +9,6 @@ } ], "GlobalVariables": [ - { - "Name": "__FirstFiscalMonth", - "Expression": "7", - "IsConfigurable": true - }, { "Name": "__FirstDayOfWeek", "Expression": "0", @@ -27,18 +22,6 @@ "Name": "__WorkingDays", "Expression": "@@GETCONFIG( WorkingDays )", "IsConfigurable": true - }, - { - "Name": "__IsStandardLocale", - "Expression": "IF ( FORMAT( DATE( 2000, 1, 1 ), \"oooo\"@@GETISO() ) = \"oooo\", TRUE, FALSE )" - }, - { - "Name": "__DayFormatString", - "Expression": "IF( __IsStandardLocale, \"ddd\", \"aaa\" )" - }, - { - "Name": "__MonthFormatString", - "Expression": "IF( __IsStandardLocale, \"mmm\", \"ooo\" )" } ], "RowVariables": [ @@ -72,23 +55,7 @@ }, { "Name": "__WeekDay", - "Expression": "FORMAT ( __Date, __DayFormatString@@GETISO() )" - }, - { - "Name": "__FiscalYearNumber", - "Expression": "__YearNumber + 1 * ( __FirstFiscalMonth > 1 && __MonthNumber >= __FirstFiscalMonth )" - }, - { - "Name": "__FiscalYearQuarterNumber", - "Expression": "CONVERT ( __FiscalYearNumber * 4 + __FiscalQuarterNumber - 1, INTEGER )" - }, - { - "Name": "__FiscalMonthNumber", - "Expression": "__MonthNumber - __FirstFiscalMonth + 1 + 12 * (__MonthNumber < __FirstFiscalMonth)" - }, - { - "Name": "__FiscalQuarterNumber", - "Expression": "ROUNDUP ( __FiscalMonthNumber / 3, 0 )" + "Expression": "FORMAT ( __Date, \"ddd\"@@GETISO() )" }, { "Name": "__HolidayName", @@ -111,8 +78,7 @@ "Step": "__Calendar", "DataCategory": "PaddedDateTableDates", "AttributeTypes": [ - "Date", - "FiscalDate" + "Date" ] }, { @@ -143,7 +109,7 @@ }, { "Name": "Year Month", - "Expression": "FORMAT ( __Date, __MonthFormatString & \" yyyy\"@@GETISO() )", + "Expression": "FORMAT ( __Date, \"mmm yyyy\"@@GETISO() )", "DataType": "String", "SortByColumn": "Year Month Number", "DataCategory": "Months" @@ -153,12 +119,11 @@ "Expression": "__YearNumber * 12 + __MonthNumber - 1", "DataType": "Int64", "IsHidden": true, - "AttributeType": "FiscalMonths", "DataCategory": "Months" }, { "Name": "Month", - "Expression": "FORMAT ( __Date, __MonthFormatString@@GETISO() )", + "Expression": "FORMAT ( __Date, \"mmm\"@@GETISO() )", "DataType": "String", "SortByColumn": "Month Number", "DataCategory": "MonthOfYear" @@ -191,42 +156,6 @@ "SQLBI_FilterSafe": true } }, - { - "Name": "Fiscal Year", - "Expression": "FORMAT ( __FiscalYearNumber, \"@_FY_@ 0000\"@@GETISO() )", - "DataType": "String", - "SortByColumn": "Fiscal Year Number", - "DataCategory": "Years" - }, - { - "Name": "Fiscal Year Number", - "Expression": "__FiscalYearNumber", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "FiscalYears", - "DataCategory": "Years" - }, - { - "Name": "Fiscal Year Quarter", - "Expression": "FORMAT ( __FiscalQuarterNumber, \"@_FQ_@0\"@@GETISO() ) & \"-\" & FORMAT ( __FiscalYearNumber, \"0000\"@@GETISO() )", - "DataType": "String", - "SortByColumn": "Fiscal Year Quarter Number", - "DataCategory": "Quarters" - }, - { - "Name": "Fiscal Year Quarter Number", - "Expression": "__FiscalYearQuarterNumber", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "FiscalQuarters", - "DataCategory": "Quarters" - }, - { - "Name": "Fiscal Quarter", - "Expression": "FORMAT( __FiscalQuarterNumber, \"@_FQ_@0\"@@GETISO() )", - "DataType": "String", - "DataCategory": "QuarterOfYear" - }, { "Name": "IsWorking", "Expression": "__IsWorkingDay", @@ -281,23 +210,6 @@ "Column": "Date" } ] - }, - { - "Name": "Fiscal", - "Levels": [ - { - "Name": "Year", - "Column": "Fiscal Year" - }, - { - "Name": "Month", - "Column": "Year Month" - }, - { - "Name": "Date", - "Column": "Date" - } - ] } ] } \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/DateTemplate-02.json b/src/Dax.Template.TestUI/Templates/DateTemplate-02.json index b3ed5cc..f58a04a 100644 --- a/src/Dax.Template.TestUI/Templates/DateTemplate-02.json +++ b/src/Dax.Template.TestUI/Templates/DateTemplate-02.json @@ -1,7 +1,7 @@ { - "_comment": "Reference Monthly Calendar", - "CalendarTypes": [ "Calendar", "Fiscal" ], - "FormatPrefixes": [ "M", "Q", "FY", "FQ" ], + "_comment": "Reference FY prefix format in DAX expression using the syntax @_FY_@", + "CalendarType": "Fiscal", + "FormatPrefixes": [ "FY", "FQ" ], "Steps": [ { "Name": "__Calendar", @@ -11,41 +11,22 @@ "GlobalVariables": [ { "Name": "__FirstFiscalMonth", - "Expression": "3", + "Expression": "7", "IsConfigurable": true }, { - "Name": "__MonthsInYear", - "Expression": "12", + "Name": "__FirstDayOfWeek", + "Expression": "0", "IsConfigurable": true }, { - "Name": "__OffsetFiscalMonthNumber", - "Expression": "__MonthsInYear + 1 - (__MonthsInYear - 12)" + "Name": "__WeekDayCalculationType", + "Expression": "IF ( __FirstDayOfWeek = 0, 7, __FirstDayOfWeek ) + 10" }, { - "Name": "__OffsetYears", - "Expression": "1", - "IsConfigurable": true, - "Comment": "Increase range of fiscal years before/after boundaries defined" - }, - { - "Name": "__TypeStartFiscalYear", - "Expression": "1", - "IsConfigurable": true, - "MultiLineComment": [ - "Fiscal year as Calendar Year of :", - "0 - First day of fiscal year", - "1 - Last day of fiscal year" - ] - }, - { - "Name": "__IsStandardLocale", - "Expression": "IF ( FORMAT( DATE( 2000, 1, 1 ), \"oooo\"@@GETISO() ) = \"oooo\", TRUE, FALSE )" - }, - { - "Name": "__MonthFormatString", - "Expression": "IF( __IsStandardLocale, \"mmm\", \"ooo\" )" + "Name": "__WorkingDays", + "Expression": "@@GETCONFIG( WorkingDays )", + "IsConfigurable": true } ], "RowVariables": [ @@ -54,67 +35,60 @@ "Expression": "[Date]" }, { - "Name": "__YearMonthNumber", - "Expression": "YEAR ( __Date ) * __MonthsInYear + MONTH ( __Date ) - 1" + "Name": "__YearNumber", + "Expression": "YEAR ( __Date )" }, { - "Name": "__FiscalMonthNumber", - "Expression": "MOD ( __YearMonthNumber + 1 * (__FirstFiscalMonth > 1) * (__MonthsInYear + 1 - __FirstFiscalMonth), __MonthsInYear ) + 1" + "Name": "__MonthNumber", + "Expression": "MONTH ( __Date )" }, { - "Name": "__FiscalYearNumber", - "Expression": "QUOTIENT ( __YearMonthNumber + __TypeStartFiscalYear * (__FirstFiscalMonth > 1) * (__MonthsInYear + 1 - __FirstFiscalMonth), __MonthsInYear )" + "Name": "__QuarterNumber", + "Expression": "QUARTER ( __Date )" }, { - "Name": "__MonthNumber", - "MultiLineExpression": [ - "IF (", - " __FiscalMonthNumber <= 12 && __FirstFiscalMonth > 1,", - " __FiscalMonthNumber + __FirstFiscalMonth", - " - IF (", - " __FiscalMonthNumber > (__OffsetFiscalMonthNumber - __FirstFiscalMonth),", - " __OffsetFiscalMonthNumber,", - " 1", - " ),", - " __FiscalMonthNumber", - ")" - ] + "Name": "__MonthNumberQ", + "Expression": "__MonthNumber - 3 * (__QuarterNumber - 1)" }, { - "Name": "__YearNumber", - "Expression": "__FiscalYearNumber - 1 * (__MonthNumber > __FiscalMonthNumber)" + "Name": "__YearQuarterNumber", + "Expression": "CONVERT ( __YearNumber * 4 + __QuarterNumber - 1, INTEGER )" }, { - "Name": "__YearMonthKey", - "Expression": "__YearNumber * 100 + __MonthNumber" + "Name": "__WeekDayNumber", + "Expression": "WEEKDAY ( __Date, __WeekDayCalculationType )" }, { - "Name": "__MonthDate", - "Expression": "DATE ( __YearNumber, __MonthNumber, 1 )" + "Name": "__WeekDay", + "Expression": "FORMAT ( __Date, \"ddd\"@@GETISO() )" }, { - "Name": "__FiscalQuarterNumber", - "Expression": "MIN ( ROUNDUP ( __FiscalMonthNumber / 3, 0 ), 4 )" + "Name": "__FiscalYearNumber", + "Expression": "__YearNumber + 1 * ( __FirstFiscalMonth > 1 && __MonthNumber >= __FirstFiscalMonth )" }, { "Name": "__FiscalYearQuarterNumber", - "Expression": "__FiscalYearNumber * 4 + __FiscalQuarterNumber - 1" + "Expression": "CONVERT ( __FiscalYearNumber * 4 + __FiscalQuarterNumber - 1, INTEGER )" }, { - "Name": "__FiscalMonthInQuarterNumber", - "Expression": "MOD ( __FiscalMonthNumber - 1, 3 ) + 1 + 3 * ( __MonthNumber > 12 )" + "Name": "__FiscalMonthNumber", + "Expression": "__MonthNumber - __FirstFiscalMonth + 1 + 12 * (__MonthNumber < __FirstFiscalMonth)" }, { - "Name": "__MonthInQuarterNumber", - "Expression": "MOD ( __MonthNumber - 1, 3 ) + 1 + 3 * ( __MonthNumber > 12 )" + "Name": "__FiscalQuarterNumber", + "Expression": "ROUNDUP ( __FiscalMonthNumber / 3, 0 )" }, { - "Name": "__QuarterNumber", - "Expression": "MIN ( ROUNDUP ( __MonthNumber / 3, 0 ), 4 )" + "Name": "__HolidayName", + "Expression": "@@GETHOLIDAYNAME( __Date )" }, { - "Name": "__YearQuarterNumber", - "Expression": "__YearNumber * 4 + __QuarterNumber - 1" + "Name": "__IsWorkingDay", + "Expression": "WEEKDAY ( __Date, 1 ) IN __WorkingDays && ISBLANK ( __HolidayName )" + }, + { + "Name": "__LastTransactionDate", + "Expression": "@@GETMAXDATE()" } ], "Columns": [ @@ -129,121 +103,71 @@ "FiscalDate" ] }, - { - "Name": "Year Month Key", - "Expression": "__YearNumber * 100 + __MonthNumber", - "DataType": "Int64", - "IsHidden": true - }, - { - "Name": "Month", - "MultiLineExpression": [ - "IF (", - " __MonthNumber > 12,", - " FORMAT ( __MonthNumber, \"@_M_@00\"@@GETISO() ),", - " FORMAT ( __MonthDate, __MonthFormatString@@GETISO() )", - ")" - ], - "DataType": "String", - "SortByColumn": "Month Number", - "DataCategory": "MonthOfYear" - }, - { - "Name": "Month Number", - "Expression": "__MonthNumber", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "MonthOfYear", - "DataCategory": "MonthOfYear" - }, { "Name": "Year Month", - "MultiLineExpression": [ - "IF (", - " __MonthNumber > 12,", - " FORMAT ( __MonthNumber, \"@_M_@00\"@@GETISO() ) & FORMAT ( __YearNumber, \" 0000\"@@GETISO() ),", - " FORMAT ( __MonthDate, __MonthFormatString & \" yyyy\"@@GETISO() )", - ")" - ], + "Expression": "FORMAT ( __Date, \"mmm yyyy\"@@GETISO() )", "DataType": "String", "SortByColumn": "Year Month Number", - "": "Months" + "DataCategory": "Months" }, { "Name": "Year Month Number", - "Expression": "__YearMonthNumber", + "Expression": "__YearNumber * 12 + __MonthNumber - 1", "DataType": "Int64", "IsHidden": true, - "DataCategory": "Months", - "AttributeTypes": [ - "Months", - "FiscalMonths" - ] + "AttributeType": "FiscalMonths", + "DataCategory": "Months" }, { - "Name": "Month In Quarter Number", - "Expression": "__MonthInQuarterNumber", + "Name": "Day of Week Number", + "Expression": "__WeekDayNumber", "DataType": "Int64", "IsHidden": true, - "AttributeType": "MonthOfQuarter", - "DataCategory": "MonthOfQuarter" + "AttributeType": "DayOfWeek", + "DataCategory": "DayOfWeek", + "Annotations": { + "SQLBI_FilterSafe": true + } }, { - "Name": "Quarter", - "Expression": "FORMAT( __Date, \"@_Q_@Q\"@@GETISO() )", + "Name": "Day of Week", + "Expression": "__WeekDay", "DataType": "String", - "DataCategory": "QuarterOfYear" + "SortByColumn": "Day of Week Number", + "DataCategory": "DayOfWeek", + "Annotations": { + "SQLBI_FilterSafe": true + } }, { - "Name": "Year Quarter", - "Expression": "FORMAT ( __QuarterNumber, \"@_Q_@0\"@@GETISO() ) & \"-\" & FORMAT ( __YearNumber, \"0000\"@@GETISO() )", + "Name": "Fiscal Year", + "Expression": "FORMAT ( __FiscalYearNumber, \"@_FY_@ 0000\"@@GETISO() )", "DataType": "String", - "SortByColumn": "Year Quarter Number", - "DataCategory": "Quarters" + "SortByColumn": "Fiscal Year Number", + "DataCategory": "Years" }, { - "Name": "Year Quarter Number", - "Expression": "__YearQuarterNumber", + "Name": "Fiscal Year Number", + "Expression": "__FiscalYearNumber", "DataType": "Int64", "IsHidden": true, - "AttributeType": "Quarters", - "DataCategory": "Quarters" - }, - { - "Name": "Year", - "Expression": "__YearNumber", - "DataType": "Int64", - "AttributeType": "Years", + "AttributeType": "FiscalYears", "DataCategory": "Years" }, { - "Name": "Fiscal Month", - "MultiLineExpression": [ - "IF (", - " __MonthNumber > 12,", - " FORMAT ( __MonthNumber, \"@_M_@00\"@@GETISO() ),", - " FORMAT ( __MonthDate, __MonthFormatString@@GETISO() )", - ")" - ], + "Name": "Fiscal Year Quarter", + "Expression": "FORMAT ( __FiscalQuarterNumber, \"@_FQ_@0\"@@GETISO() ) & \"-\" & FORMAT ( __FiscalYearNumber, \"0000\"@@GETISO() )", "DataType": "String", - "SortByColumn": "Fiscal Month Number", - "DataCategory": "MonthOfYear" - }, - { - "Name": "Fiscal Month Number", - "Expression": "__FiscalMonthNumber", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "FiscalMonthOfYear", - "DataCategory": "MonthOfYear" + "SortByColumn": "Fiscal Year Quarter Number", + "DataCategory": "Quarters" }, { - "Name": "Fiscal Month In Quarter Number", - "Expression": "__FiscalMonthInQuarterNumber", + "Name": "Fiscal Year Quarter Number", + "Expression": "__FiscalYearQuarterNumber", "DataType": "Int64", "IsHidden": true, - "AttributeType": "FiscalMonthOfQuarter", - "DataCategory": "MonthOfQuarter" + "AttributeType": "FiscalQuarters", + "DataCategory": "Quarters" }, { "Name": "Fiscal Quarter", @@ -252,56 +176,45 @@ "DataCategory": "QuarterOfYear" }, { - "Name": "Fiscal Year Quarter", - "Expression": "FORMAT ( __FiscalQuarterNumber, \"@_FQ_@0\"@@GETISO() ) & \"-\" & FORMAT ( __FiscalYearNumber, \"0000\"@@GETISO() )", - "DataType": "String", - "SortByColumn": "Fiscal Year Quarter Number", - "DataCategory": "Quarters" + "Name": "IsWorking", + "Expression": "__IsWorkingDay", + "DataType": "Boolean", + "IsHidden": true, + "RequiresHolidays": true, + "Annotations": { + "SQLBI_FilterSafe": true + } }, { - "Name": "Fiscal Year Quarter Number", - "Expression": "__FiscalYearQuarterNumber", + "Name": "Working Day Value", + "Expression": "IF ( __IsWorkingDay, 1 )", "DataType": "Int64", "IsHidden": true, - "AttributeType": "FiscalQuarters", - "DataCategory": "Quarters" + "RequiresHolidays": true, + "Annotations": { + "SQLBI_FilterSafe": true + } }, { - "Name": "Fiscal Year", - "Expression": "FORMAT ( __FiscalYearNumber, \"@_FY_@ 0000\"@@GETISO() )", + "Name": "Holiday Name", + "Expression": "__HolidayName", "DataType": "String", - "SortByColumn": "Fiscal Year Number", - "DataCategory": "Years" + "RequiresHolidays": true, + "Annotations": { + "SQLBI_FilterSafe": true + } }, { - "Name": "Fiscal Year Number", - "Expression": "__FiscalYearNumber", - "DataType": "Int64", + "Name": "DateWithTransactions", + "Expression": "__Date <= __LastTransactionDate", + "DataType": "Boolean", "IsHidden": true, - "AttributeType": "FiscalYears", - "DataCategory": "Years" + "AttributeType": "DateDuration" } ], "Hierarchies": [ { - "Name": "Fiscal Year-Quarter", - "Levels": [ - { - "Name": "Year", - "Column": "Fiscal Year" - }, - { - "Name": "Quarter", - "Column": "Fiscal Year Quarter" - }, - { - "Name": "Month", - "Column": "Year Month" - } - ] - }, - { - "Name": "Fiscal Year-Month", + "Name": "Fiscal", "Levels": [ { "Name": "Year", @@ -310,36 +223,10 @@ { "Name": "Month", "Column": "Year Month" - } - ] - }, - { - "Name": "Year-Quarter", - "Levels": [ - { - "Name": "Year", - "Column": "Year" }, { - "Name": "Quarter", - "Column": "Year Quarter" - }, - { - "Name": "Month", - "Column": "Year Month" - } - ] - }, - { - "Name": "Year-Month", - "Levels": [ - { - "Name": "Year", - "Column": "Year" - }, - { - "Name": "Month", - "Column": "Year Month" + "Name": "Date", + "Column": "Date" } ] } diff --git a/src/Dax.Template.TestUI/Templates/DateTemplate-03.json b/src/Dax.Template.TestUI/Templates/DateTemplate-03.json index 8cd0224..3edddea 100644 --- a/src/Dax.Template.TestUI/Templates/DateTemplate-03.json +++ b/src/Dax.Template.TestUI/Templates/DateTemplate-03.json @@ -1,7 +1,7 @@ { - "_comment": "Reference Custom Fiscal Calendar + Holidays", - "CalendarType": "Fiscal", - "FormatPrefixes": [ "Q", "FY", "FQ" ], + "_comment": "Reference Monthly Calendar", + "CalendarTypes": [ "Calendar" ], + "FormatPrefixes": [ "M", "Q" ], "Steps": [ { "Name": "__Calendar", @@ -10,64 +10,13 @@ ], "GlobalVariables": [ { - "Name": "__FirstFiscalMonth", - "Expression": "3", + "Name": "__MonthsInYear", + "Expression": "12", "IsConfigurable": true }, { - "Name": "__FirstDayOfWeek", - "Expression": "0", - "IsConfigurable": true, - "Comment": "0 = Sunday, 1 = Monday, ..." - }, - { - "Name": "__TypeStartFiscalYear", - "Expression": "1", - "IsConfigurable": true, - "MultiLineComment": [ - "Fiscal year as Calendar Year of :", - "0 - First day of fiscal year", - "1 - Last day of fiscal year" - ] - }, - { - "Name": "__WorkingDays", - "Expression": "@@GETCONFIG( WorkingDays )", - "IsConfigurable": true - }, - { - "Name": "__WorkingDayType", - "Expression": "\"Working day\"", - "IsConfigurable": true - }, - { - "Name": "__NonWorkingDayType", - "Expression": "\"Non-working day\"", - "IsConfigurable": true - }, - { - "Name": "__WeekDayCalculationType", - "Expression": "IF ( __FirstDayOfWeek = 0, 7, __FirstDayOfWeek ) + 10" - }, - { - "Name": "__OffsetFiscalYearBeforeMonth", - "Expression": "IF ( __FirstFiscalMonth > 1, __TypeStartFiscalYear - 1, 0 )" - }, - { - "Name": "__OffsetFiscalYearOnOrAfterMonth", - "Expression": "IF ( __FirstFiscalMonth > 1, __TypeStartFiscalYear, 0 )" - }, - { - "Name": "__IsStandardLocale", - "Expression": "IF ( FORMAT( DATE( 2000, 1, 1 ), \"oooo\"@@GETISO() ) = \"oooo\", TRUE, FALSE )" - }, - { - "Name": "__DayFormatString", - "Expression": "IF( __IsStandardLocale, \"ddd\", \"aaa\" )" - }, - { - "Name": "__MonthFormatString", - "Expression": "IF( __IsStandardLocale, \"mmm\", \"ooo\" )" + "Name": "__OffsetFiscalMonthNumber", + "Expression": "__MonthsInYear + 1 - (__MonthsInYear - 12)" } ], "RowVariables": [ @@ -76,73 +25,37 @@ "Expression": "[Date]" }, { - "Name": "__YearNumber", - "Expression": "YEAR ( __Date )" + "Name": "__YearMonthNumber", + "Expression": "YEAR ( __Date ) * __MonthsInYear + MONTH ( __Date ) - 1" }, { "Name": "__MonthNumber", - "Expression": "MONTH ( __Date )" - }, - { - "Name": "__DayOfMonthNumber", - "Expression": "DAY ( __Date )" - }, - { - "Name": "__DateKey", - "Expression": "__YearNumber * 10000 + __MonthNumber * 100 + __DayOfMonthNumber" - }, - { - "Name": "__FiscalYearNumber", - "Expression": "__YearNumber + __OffsetFiscalYearOnOrAfterMonth * ( __FirstFiscalMonth > 1 && __MonthNumber >= __FirstFiscalMonth ) + __OffsetFiscalYearBeforeMonth * ( __FirstFiscalMonth > 1 && __MonthNumber < __FirstFiscalMonth )" + "Expression": "MOD ( __YearMonthNumber, __MonthsInYear ) + 1" }, { - "Name": "__FiscalMonthNumber", - "Expression": "__MonthNumber - __FirstFiscalMonth + 1 + 12 * (__MonthNumber < __FirstFiscalMonth)" - }, - { - "Name": "__FiscalQuarterNumber", - "Expression": "ROUNDUP ( __FiscalMonthNumber / 3, 0 )" - }, - { - "Name": "__FiscalYearQuarterNumber", - "Expression": "CONVERT ( __FiscalYearNumber * 4 + __FiscalQuarterNumber - 1, INTEGER )" - }, - { - "Name": "__FiscalMonthInQuarterNumber", - "Expression": "MOD ( __FiscalMonthNumber - 1, 3 ) + 1" - }, - { - "Name": "__FirstDayOfYear", - "Expression": "DATE ( __FiscalYearNumber - 1 * (__FirstFiscalMonth > 1), __FirstFiscalMonth, 1 )" - }, - { - "Name": "__FiscalYearDayNumber", - "MultiLineExpression": [ - "SUMX (", - " CALENDAR ( __FirstDayOfYear, __Date ),", - " 1 * ( MONTH ( ''[Date] ) <> 2 || DAY ( ''[Date] ) <> 29 )", - ")" - ] + "Name": "__YearNumber", + "Expression": "QUOTIENT ( __YearMonthNumber, __MonthsInYear )" }, + { - "Name": "__WeekDayNumber", - "Expression": "WEEKDAY ( __Date, __WeekDayCalculationType )" + "Name": "__YearMonthKey", + "Expression": "__YearNumber * 100 + __MonthNumber" }, { - "Name": "__WeekDay", - "Expression": "FORMAT ( __Date, __DayFormatString@@GETISO() )" + "Name": "__MonthDate", + "Expression": "DATE ( __YearNumber, __MonthNumber, 1 )" }, { - "Name": "__HolidayName", - "Expression": "@@GETHOLIDAYNAME( __Date )" + "Name": "__MonthInQuarterNumber", + "Expression": "MOD ( __MonthNumber - 1, 3 ) + 1 + 3 * ( __MonthNumber > 12 )" }, { - "Name": "__IsWorkingDay", - "Expression": "WEEKDAY ( __Date, 1 ) IN __WorkingDays && ISBLANK ( __HolidayName )" + "Name": "__QuarterNumber", + "Expression": "MIN ( ROUNDUP ( __MonthNumber / 3, 0 ), 4 )" }, { - "Name": "__LastTransactionDate", - "Expression": "@@GETMAXDATE()" + "Name": "__YearQuarterNumber", + "Expression": "__YearNumber * 4 + __QuarterNumber - 1" } ], "Columns": [ @@ -153,193 +66,121 @@ "Step": "__Calendar", "DataCategory": "PaddedDateTableDates", "AttributeTypes": [ - "Date", - "FiscalDate" + "Date" ] }, { - "Name": "DateKey", - "Expression": "__DateKey", + "Name": "Year Month Key", + "Expression": "__YearNumber * 100 + __MonthNumber", "DataType": "Int64", "IsHidden": true }, - { - "Name": "Sequential Day Number", - "Expression": "INT ( __Date )", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "ManufacturingDate", - "_comment": "We use ManufacturingDate as a special tag to identify an alternate date to avoid removing the filter on all the columns because of mark as date table" - }, - { - "Name": "Year Month", - "Expression": "FORMAT ( __Date, __MonthFormatString & \" yyyy\"@@GETISO() )", - "DataType": "String", - "SortByColumn": "Year Month Number", - "DataCategory": "Months" - }, - { - "Name": "Year Month Number", - "Expression": "__YearNumber * 12 + __MonthNumber - 1", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "FiscalMonths", - "DataCategory": "Months" - }, - { - "Name": "Fiscal Year", - "Expression": "FORMAT ( __FiscalYearNumber, \"@_FY_@ 0000\"@@GETISO() )", - "DataType": "String", - "SortByColumn": "Fiscal Year Number", - "DataCategory": "Years" - }, - { - "Name": "Fiscal Year Number", - "Expression": "__FiscalYearNumber", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "FiscalYears", - "DataCategory": "Years" - }, - { - "Name": "Fiscal Year Quarter", - "Expression": "FORMAT ( __FiscalQuarterNumber, \"@_FQ_@0\"@@GETISO() ) & \"-\" & FORMAT ( __FiscalYearNumber, \"0000\"@@GETISO() )", - "DataType": "String", - "SortByColumn": "Fiscal Year Quarter Number", - "DataCategory": "Quarters" - }, - { - "Name": "Fiscal Year Quarter Number", - "Expression": "__FiscalYearQuarterNumber", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "FiscalQuarters", - "DataCategory": "Quarters" - }, - { - "Name": "Fiscal Quarter", - "Expression": "FORMAT( __FiscalQuarterNumber, \"@_FQ_@0\"@@GETISO() )", - "DataType": "String", - "DataCategory": "QuarterOfYear" - }, { "Name": "Month", - "Expression": "FORMAT ( __Date, __MonthFormatString@@GETISO() )", + "MultiLineExpression": [ + "IF (", + " __MonthNumber > 12,", + " FORMAT ( __MonthNumber, \"@_M_@00\"@@GETISO() ),", + " FORMAT ( __MonthDate, \"mmm\"@@GETISO() )", + ")" + ], "DataType": "String", - "SortByColumn": "Fiscal Month Number", + "SortByColumn": "Month Number", "DataCategory": "MonthOfYear" }, { - "Name": "Fiscal Month Number", - "Expression": "__FiscalMonthNumber", + "Name": "Month Number", + "Expression": "__MonthNumber", "DataType": "Int64", "IsHidden": true, - "AttributeType": "FiscalMonthOfYear", + "AttributeType": "MonthOfYear", "DataCategory": "MonthOfYear" }, { - "Name": "Fiscal Month in Quarter Number", - "Expression": "__FiscalMonthInQuarterNumber", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "FiscalMonthOfQuarter", - "DataCategory": "MonthOfQuarter" - }, - { - "Name": "Day of Week", - "Expression": "__WeekDay", + "Name": "Year Month", + "MultiLineExpression": [ + "IF (", + " __MonthNumber > 12,", + " FORMAT ( __MonthNumber, \"@_M_@00\"@@GETISO() ) & FORMAT ( __YearNumber, \" 0000\"@@GETISO() ),", + " FORMAT ( __MonthDate, \"mmm yyyy\"@@GETISO() )", + ")" + ], "DataType": "String", - "SortByColumn": "Day of Week Number", - "AttributeType": "FiscalDayOfWeek", - "DataCategory": "DayOfWeek", - "Annotations": { - "SQLBI_FilterSafe": true - } - }, - { - "Name": "Day of Week Number", - "Expression": "__WeekDayNumber", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "FiscalDayOfWeek", - "DataCategory": "DayOfWeek", - "Annotations": { - "SQLBI_FilterSafe": true - } + "SortByColumn": "Year Month Number", + "": "Months" }, { - "Name": "Day of Month Number", - "Expression": "__DayOfMonthNumber", + "Name": "Year Month Number", + "Expression": "__YearMonthNumber", "DataType": "Int64", "IsHidden": true, - "AttributeType": "FiscalDayOfMonth", - "DataCategory": "DayOfMonth" + "DataCategory": "Months", + "AttributeTypes": [ + "Months", + "FiscalMonths" + ] }, { - "Name": "Day of Fiscal Year Number", - "Expression": "__FiscalYearDayNumber", + "Name": "Month In Quarter Number", + "Expression": "__MonthInQuarterNumber", "DataType": "Int64", "IsHidden": true, - "AttributeType": "FiscalDayOfYear", - "DataCategory": "DayOfYear" + "AttributeType": "MonthOfQuarter", + "DataCategory": "MonthOfQuarter" }, { - "Name": "Working Day", - "Expression": "IF ( __IsWorkingDay, __WorkingDayType, __NonWorkingDayType )", + "Name": "Quarter", + "Expression": "FORMAT( __Date, \"@_Q_@Q\"@@GETISO() )", "DataType": "String", - "RequiresHolidays": true, - "Annotations": { - "SQLBI_FilterSafe": true - } + "DataCategory": "QuarterOfYear" }, { - "Name": "IsWorking", - "Expression": "__IsWorkingDay", - "DataType": "Boolean", - "RequiresHolidays": true, - "IsHidden": true, - "Annotations": { - "SQLBI_FilterSafe": true - } + "Name": "Year Quarter", + "Expression": "FORMAT ( __QuarterNumber, \"@_Q_@0\"@@GETISO() ) & \"-\" & FORMAT ( __YearNumber, \"0000\"@@GETISO() )", + "DataType": "String", + "SortByColumn": "Year Quarter Number", + "DataCategory": "Quarters" }, { - "Name": "Working Day Value", - "Expression": "IF ( __IsWorkingDay, 1 )", + "Name": "Year Quarter Number", + "Expression": "__YearQuarterNumber", "DataType": "Int64", - "RequiresHolidays": true, "IsHidden": true, - "Annotations": { - "SQLBI_FilterSafe": true - } - }, - { - "Name": "Holiday Name", - "Expression": "__HolidayName", - "DataType": "String", - "RequiresHolidays": true, - "Annotations": { - "SQLBI_FilterSafe": true - } + "AttributeType": "Quarters", + "DataCategory": "Quarters" }, { - "Name": "DateWithTransactions", - "Expression": "__Date <= __LastTransactionDate", - "DataType": "Boolean", - "IsHidden": true, - "AttributeType": "DateDuration" + "Name": "Year", + "Expression": "__YearNumber", + "DataType": "Int64", + "AttributeType": "Years", + "DataCategory": "Years" } ], "Hierarchies": [ { - "Name": "Fiscal", + "Name": "Year-Quarter", "Levels": [ { "Name": "Year", - "Column": "Fiscal Year" + "Column": "Year" }, { "Name": "Quarter", - "Column": "Fiscal Year Quarter" + "Column": "Year Quarter" + }, + { + "Name": "Month", + "Column": "Year Month" + } + ] + }, + { + "Name": "Year-Month", + "Levels": [ + { + "Name": "Year", + "Column": "Year" }, { "Name": "Month", diff --git a/src/Dax.Template.TestUI/Templates/DateTemplate-04.json b/src/Dax.Template.TestUI/Templates/DateTemplate-04.json index 2483b03..6c4af21 100644 --- a/src/Dax.Template.TestUI/Templates/DateTemplate-04.json +++ b/src/Dax.Template.TestUI/Templates/DateTemplate-04.json @@ -1,117 +1,27 @@ { - "_comment": "Reference Weekly Calendar + Holidays", - "CalendarType": "Weekly", - "FormatPrefixes": [ "Q", "FY", "FQ", "FM", "FW" ], + "_comment": "Reference Monthly Calendar", + "CalendarTypes": [ "Fiscal" ], + "FormatPrefixes": [ "FY", "FQ" ], "Steps": [ - { - "Name": "__GenerateFiscalYears", - "MultiLineExpression": [ - "SELECTCOLUMNS (", - " GENERATESERIES ( __FirstYear - __OffsetFiscalYear, __LastYear + __OffsetFiscalYear, 1 ),", - " \"@YearNumber\", ''[Value]", - ")" - ] - }, { "Name": "__Calendar", - "MultiLineExpression": [ - "GENERATE (", - " __GenerateFiscalYears,", - " VAR _StartFiscalYearNumber = [@YearNumber] - ( __OffsetFiscalYear * __TypeStartFiscalYear )", - " VAR _FirstDayCurrentYear = DATE ( _StartFiscalYearNumber, __FirstFiscalMonth, 1 )", - " VAR _FirstDayNextYear = DATE ( _StartFiscalYearNumber + 1, __FirstFiscalMonth, 1 )", - " VAR _DayOfWeekNumberCurrentYear = WEEKDAY ( _FirstDayCurrentYear, __WeekDayCalculationType )", - " VAR _OffsetStartCurrentFiscalYear =", - " SWITCH (", - " __WeeklyType,", - " \"Last\", 1 - _DayOfWeekNumberCurrentYear,", - " \"Nearest\", IF (", - " _DayOfWeekNumberCurrentYear >= 5,", - " 8 - _DayOfWeekNumberCurrentYear,", - " 1 - _DayOfWeekNumberCurrentYear", - " ),", - " ERROR ( \"Unknown WeeklyType definition\" )", - " )", - " VAR _DayOfWeekNumberNextYear = WEEKDAY ( _FirstDayNextYear, __WeekDayCalculationType )", - " VAR _OffsetStartNextFiscalYear =", - " SWITCH (", - " __WeeklyType,", - " \"Last\", - _DayOfWeekNumberNextYear,", - " \"Nearest\", IF (", - " _DayOfWeekNumberNextYear >= 5,", - " 7 - _DayOfWeekNumberNextYear,", - " - _DayOfWeekNumberNextYear", - " ),", - " ERROR ( \"Unknown WeeklyType definition\" )", - " )", - " VAR _FirstDayOfFiscalYear = _FirstDayCurrentYear + _OffsetStartCurrentFiscalYear", - " VAR _LastDayOfFiscalYear = _FirstDayNextYear + _OffsetStartNextFiscalYear", - " RETURN", - " GENERATE (", - " ROW ( \"@StartOfYear\", _FirstDayOfFiscalYear, \"@EndOfYear\", _LastDayOfFiscalYear ),", - " CALENDAR ( _FirstDayOfFiscalYear, _LastDayOfFiscalYear )", - " )", - ")" - ] + "Expression": "@@GETCALENDAR()" } ], "GlobalVariables": [ { "Name": "__FirstFiscalMonth", - "Expression": "1", - "IsConfigurable": true, - "Comment": "First month of the fiscal year" - }, - { - "Name": "__FirstDayOfWeek", - "Expression": "0", - "IsConfigurable": true, - "Comment": "0 = Sunday, 1 = Monday, ..." - }, - { - "Name": "__TypeStartFiscalYear", - "Expression": "1", - "IsConfigurable": true, - "MultiLineComment": [ - "Fiscal year as Calendar Year of :", - "0 - First day of fiscal year", - "1 - Last day of fiscal year" - ] + "Expression": "3", + "IsConfigurable": true }, { - "Name": "__QuarterWeekType", - "Expression": "\"445\"", - "IsConfigurable": true, - "Comment": "Supports only 445, 454, and 544" + "Name": "__MonthsInYear", + "Expression": "12", + "IsConfigurable": true }, { - "Name": "__WeeklyType", - "Expression": "\"Last\"", - "IsConfigurable": true, - "MultiLineComment": [ - "Supports only Nearest or Last", - "Last: for last weekday of the month at fiscal year end", - "Nearest: for last weekday nearest the end of month", - "Reference for Last/Nearest definition: https://en.wikipedia.org/wiki/4%E2%80%934%E2%80%935_calendar)" - ] - }, - { - "Name": "__WorkingDays", - "Expression": "@@GETCONFIG( WorkingDays )", - "IsConfigurable": true, - "Comment": "Set the working days - 0 = Sunday, 1 = Monday, ... 6 = Saturday" - }, - { - "Name": "__WorkingDayType", - "Expression": "\"Working day\"", - "IsConfigurable": true, - "Comment": "Description of working daysfor Working Day column" - }, - { - "Name": "__NonWorkingDayType", - "Expression": "\"Non-working day\"", - "IsConfigurable": true, - "Comment": "Description of non-working days for Working Day column" + "Name": "__OffsetFiscalMonthNumber", + "Expression": "__MonthsInYear + 1 - (__MonthsInYear - 12)" }, { "Name": "__OffsetYears", @@ -120,109 +30,14 @@ "Comment": "Increase range of fiscal years before/after boundaries defined" }, { - "Name": "__FirstTransactionDate", - "Expression": "@@GETMINDATE()" - }, - { - "Name": "__LastTransactionDate", - "Expression": "@@GETMAXDATE()" - }, - { - "Name": "__FirstYearTransaction", - "MultiLineExpression": [ - "YEAR ( __FirstTransactionDate )", - " + 1 * ( MONTH ( __FirstTransactionDate ) >= __FirstFiscalMonth", - " && __FirstFiscalMonth > 1 )" - ] - }, - { - "Name": "__LastYearTransaction", - "MultiLineExpression": [ - "YEAR ( __LastTransactionDate )", - " + 1 * ( MONTH ( __LastTransactionDate ) >= __FirstFiscalMonth", - " && __FirstFiscalMonth > 1 )" - ] - }, - { - "Name": "__FirstYear", - "Expression": "@@GETMINYEAR( __FirstYearTransaction )" - }, - { - "Name": "__LastYear", - "Expression": "@@GETMAXYEAR( __LastYearTransaction )" - }, - { - "Name": "__FirstDayCalendar", - "Expression": "DATE ( __FirstYear - 1, 1, 1 )" - }, - { - "Name": "__LastDayCalendar", - "Expression": "DATE ( __LastYear + 1, 12, 31 )" - }, - { - "Name": "__WeekDayCalculationType", - "Expression": "IF ( __FirstDayOfWeek = 0, 7, __FirstDayOfWeek ) + 10" - }, - { - "Name": "__OffsetFiscalYear", - "Expression": "IF ( __FirstFiscalMonth > 1, __OffsetYears, 0 )" - }, - { - "Name": "__WeeksInP1", - "MultiLineExpression": [ - "SWITCH (", - " __QuarterWeekType,", - " \"445\", 4,", - " \"454\", 4,", - " \"544\", 5,", - " ERROR ( \"__QuarterWeekType only supports 445, 454, and 544\" )", - ")" - ] - }, - { - "Name": "__WeeksInP2", - "MultiLineExpression": [ - "SWITCH (", - " __QuarterWeekType,", - " \"445\", 4,", - " \"454\", 5,", - " \"544\", 4,", - " ERROR ( \"__QuarterWeekType only supports 445, 454, and 544\" )", - ")" - ] - }, - { - "Name": "__WeeksInP3", - "MultiLineExpression": [ - "SWITCH (", - " __QuarterWeekType,", - " \"445\", 5,", - " \"454\", 4,", - " \"544\", 4,", - " ERROR ( \"__QuarterWeekType only supports 445, 454, and 544\" )", - ")" + "Name": "__TypeStartFiscalYear", + "Expression": "1", + "IsConfigurable": true, + "MultiLineComment": [ + "Fiscal year as Calendar Year of :", + "0 - First day of fiscal year", + "1 - Last day of fiscal year" ] - }, - { - "Name": "__FirstSundayReference", - "Expression": "DATE ( 1900, 12, 30 )", - "Comment": "Do not change this" - }, - { - "Name": "__FirstWeekReference", - "Expression": "__FirstSundayReference + __FirstDayOfWeek" - }, - { - "Name": "__IsStandardLocale", - "Expression": "IF ( FORMAT( DATE( 2000, 1, 1 ), \"oooo\"@@GETISO() ) = \"oooo\", TRUE, FALSE )" - }, - { - "Name": "__DayFormatString", - "Expression": "IF( __IsStandardLocale, \"ddd\", \"aaa\" )" - }, - { - "Name": "__MonthFormatString", - "Expression": "IF( __IsStandardLocale, \"mmm\", \"ooo\" )" } ], "RowVariables": [ @@ -231,143 +46,66 @@ "Expression": "[Date]" }, { - "Name": "__FiscalYearNumber", - "Expression": "[@YearNumber]" - }, - { - "Name": "__FiscalYear", - "Expression": "FORMAT ( __FiscalYearNumber, \"@_FY_@ 0000\"@@GETISO() )" - }, - { - "Name": "__FiscalDayOfYearNumber", - "Expression": "INT ( __Date - [@StartOfYear] + 1 )" - }, - { - "Name": "__FiscalWeekNumber", - "Expression": "INT ( CEILING ( __FiscalDayOfYearNumber / 7, 1 ) )" - }, - { - "Name": "__FiscalWeek", - "Expression": "FORMAT ( __FiscalWeekNumber, \"@_FW_@00\" )" - }, - { - "Name": "__FiscalYearWeekNumber", - "Expression": "INT ( DIVIDE ( __Date - __FirstWeekReference, 7 ) ) + 1" + "Name": "__YearMonthNumber", + "Expression": "YEAR ( __Date ) * __MonthsInYear + MONTH ( __Date ) - 1" }, { - "Name": "__FiscalYearWeek", - "Expression": "FORMAT ( __FiscalWeekNumber, \"@_FW_@00\" ) & \"-\" & __FiscalYearNumber" - }, - { - "Name": "__FiscalQuarterNumber", - "Expression": "IF ( __FiscalWeekNumber > 52, 4, ROUNDUP ( __FiscalWeekNumber / 13, 0 ) )" - }, - { - "Name": "__FiscalQuarter", - "Expression": "FORMAT ( __FiscalYearNumber, \"@_FY_@ 0000\"@@GETISO() )" - }, - { - "Name": "__FiscalWeekInQuarterNumber", - "Expression": "IF ( __FiscalWeekNumber > 52, 14, __FiscalWeekNumber - 13 * ( __FiscalQuarterNumber - 1 ) )" - }, - { - "Name": "__FiscalYearMonthNumber", - "Expression": "__FiscalYearNumber * 12 - 1 + __FiscalMonthNumber" + "Name": "__FiscalMonthNumber", + "Expression": "MOD ( __YearMonthNumber + 1 * (__FirstFiscalMonth > 1) * (__MonthsInYear + 1 - __FirstFiscalMonth), __MonthsInYear ) + 1" }, { - "Name": "__FiscalYearMonth", - "Expression": "FORMAT ( __FiscalStartOfMonth + 14, \"@_FM_@ \" & __MonthFormatString & \" yyyy\"@@GETISO() )" + "Name": "__FiscalYearNumber", + "Expression": "QUOTIENT ( __YearMonthNumber + __TypeStartFiscalYear * (__FirstFiscalMonth > 1) * (__MonthsInYear + 1 - __FirstFiscalMonth), __MonthsInYear )" }, { - "Name": "__FiscalStartOfMonth", + "Name": "__MonthNumber", "MultiLineExpression": [ - "MINX (", - " FILTER ( @@GETLASTSTEP() , [Fiscal Year Month Number] = __FiscalYearMonthNumber ),", - " [Date]", + "IF (", + " __FiscalMonthNumber <= 12 && __FirstFiscalMonth > 1,", + " __FiscalMonthNumber + __FirstFiscalMonth", + " - IF (", + " __FiscalMonthNumber > (__OffsetFiscalMonthNumber - __FirstFiscalMonth),", + " __OffsetFiscalMonthNumber,", + " 1", + " ),", + " __FiscalMonthNumber", ")" ] }, { - "Name": "__FiscalStartOfQuarter", - "MultiLineExpression": [ - "MINX (", - " FILTER ( @@GETLASTSTEP() , [Fiscal Year Quarter Number] = __FiscalYearQuarterNumber ),", - " [Date]", - ")" - ] + "Name": "__YearNumber", + "Expression": "__FiscalYearNumber - 1 * (__MonthNumber > __FiscalMonthNumber)" }, { - "Name": "__FiscalMonthNumber", - "MultiLineExpression": [ - "( __FiscalQuarterNumber - 1 ) * 3", - " + SWITCH (", - " TRUE,", - " __FiscalWeekInQuarterNumber <= __WeeksInP1, 1,", - " __FiscalWeekInQuarterNumber <= ( __WeeksInP1 + __WeeksInP2 ), 2,", - " 3", - " )" - ] + "Name": "__YearMonthKey", + "Expression": "__YearNumber * 100 + __MonthNumber" }, { - "Name": "__FiscalMonth", - "Expression": "FORMAT ( __FiscalStartOfMonth + 14, \"@_FM_@ \" & __MonthFormatString@@GETISO() )" + "Name": "__MonthDate", + "Expression": "DATE ( __YearNumber, __MonthNumber, 1 )" }, { - "Name": "__FiscalYearQuarterNumber", - "Expression": "__FiscalYearNumber * 4 - 1 + __FiscalQuarterNumber" - }, - { - "Name": "__FiscalYearQuarter", - "Expression": "\"FQ\" & __FiscalQuarterNumber & \"-\" & __FiscalYearNumber" - }, - { - "Name": "__HolidayName", - "Expression": "@@GETHOLIDAYNAME( __Date )" - }, - { - "Name": "__IsWorkingDay", - "Expression": "WEEKDAY ( __Date, 1 ) IN __WorkingDays && ISBLANK ( __HolidayName )" - }, - { - "Name": "__WeekDayNumber", - "Expression": "WEEKDAY ( __Date, __WeekDayCalculationType )" + "Name": "__FiscalQuarterNumber", + "Expression": "MIN ( ROUNDUP ( __FiscalMonthNumber / 3, 0 ), 4 )" }, { - "Name": "__WeekDay", - "Expression": "FORMAT ( __Date, __DayFormatString@@GETISO() )" + "Name": "__FiscalYearQuarterNumber", + "Expression": "__FiscalYearNumber * 4 + __FiscalQuarterNumber - 1" }, { - "Name": "__FiscalDayOfMonthNumber", - "Expression": "INT ( __Date - __FiscalStartOfMonth + 1 )" + "Name": "__FiscalMonthInQuarterNumber", + "Expression": "MOD ( __FiscalMonthNumber - 1, 3 ) + 1 + 3 * ( __MonthNumber > 12 )" }, { - "Name": "__FiscalDayOfQuarterNumber", - "Expression": "INT ( __Date - __FiscalStartOfQuarter + 1 )" + "Name": "__QuarterNumber", + "Expression": "MIN ( ROUNDUP ( __MonthNumber / 3, 0 ), 4 )" }, { - "Name": "__LastTransactionDate", - "Expression": "@@GETMAXDATE()" + "Name": "__YearQuarterNumber", + "Expression": "__YearNumber * 4 + __QuarterNumber - 1" } ], "Columns": [ - { - "Name": "@StartOfYear", - "DataType": "Int64", - "IsTemporary": true, - "Step": "__Calendar" - }, - { - "Name": "@EndOfYear", - "DataType": "Int64", - "IsTemporary": true, - "Step": "__Calendar" - }, - { - "Name": "@YearNumber", - "DataType": "Int64", - "IsTemporary": true, - "Step": "__GenerateFiscalYears" - }, { "Name": "Date", "DataType": "DateTime", @@ -380,226 +118,104 @@ ] }, { - "Name": "Sequential Day Number", - "DataType": "Int64", - "Expression": "INT ( __Date )", - "IsHidden": true, - "AttributeType": "ManufacturingDate", - "_comment": "We use ManufacturingDate as a special tag to identify an alternate date to avoid removing the filter on all the columns because of mark as date table" - }, - { - "Name": "Fiscal Year Number", - "DataType": "Int64", - "Expression": "__FiscalYearNumber", - "IsHidden": true, - "AttributeType": "FiscalYears", - "DataCategory": "Years" - }, - { - "Name": "Fiscal Year", - "DataType": "String", - "Expression": "__FiscalYear", - "SortByColumn": "Fiscal Year Number", - "DataCategory": "Years" - }, - { - "Name": "Fiscal Quarter Number", + "Name": "Year Month Key", + "Expression": "__YearNumber * 100 + __MonthNumber", "DataType": "Int64", - "Expression": "__FiscalQuarterNumber", - "IsHidden": true, - "AttributeType": "FiscalQuarterOfYear", - "DataCategory": "Quarters" + "IsHidden": true }, { - "Name": "Fiscal Quarter", - "DataType": "String", - "Expression": "__FiscalQuarter", - "SortByColumn": "Fiscal Quarter Number", - "DataCategory": "Quarters" - }, - { - "Name": "Fiscal Year Quarter Number", - "DataType": "Int64", - "Expression": "__FiscalYearQuarterNumber", - "IsHidden": true, - "AttributeType": "FiscalQuarters", - "DataCategory": "Quarters" - }, - { - "Name": "Fiscal Year Quarter", + "Name": "Year Month", + "MultiLineExpression": [ + "IF (", + " __MonthNumber > 12,", + " FORMAT ( __MonthNumber, \"@_M_@00\"@@GETISO() ) & FORMAT ( __YearNumber, \" 0000\"@@GETISO() ),", + " FORMAT ( __MonthDate, \"mmm yyyy\"@@GETISO() )", + ")" + ], "DataType": "String", - "Expression": "__FiscalYearQuarter", - "SortByColumn": "Fiscal Year Quarter Number", - "DataCategory": "Quarters" + "SortByColumn": "Year Month Number", + "DataCategory": "Months" }, { - "Name": "Fiscal Month Number", + "Name": "Year Month Number", + "Expression": "__YearMonthNumber", "DataType": "Int64", - "Expression": "__FiscalMonthNumber", "IsHidden": true, - "AttributeType": "FiscalMonthOfYear", - "DataCategory": "MonthOfYear" + "DataCategory": "Months", + "AttributeTypes": [ + "Months", + "FiscalMonths" + ] }, { "Name": "Fiscal Month", + "MultiLineExpression": [ + "IF (", + " __MonthNumber > 12,", + " FORMAT ( __MonthNumber, \"@_M_@00\"@@GETISO() ),", + " FORMAT ( __MonthDate, \"mmm\"@@GETISO() )", + ")" + ], "DataType": "String", - "Expression": "__FiscalMonth", "SortByColumn": "Fiscal Month Number", "DataCategory": "MonthOfYear" }, { - "Name": "Fiscal Year Month Number", - "DataType": "Int64", - "Expression": "__FiscalYearMonthNumber", - "IsHidden": true, - "AttributeType": "FiscalMonths", - "DataCategory": "Months" - }, - { - "Name": "Fiscal Year Month", - "DataType": "String", - "Expression": "__FiscalYearMonth", - "SortByColumn": "Fiscal Year Month Number", - "DataCategory": "Months" - }, - { - "Name": "Fiscal Week Number", + "Name": "Fiscal Month Number", + "Expression": "__FiscalMonthNumber", "DataType": "Int64", - "Expression": "__FiscalWeekNumber", "IsHidden": true, - "AttributeType": "FiscalWeekOfYear" - }, - { - "Name": "Fiscal Week", - "DataType": "String", - "Expression": "__FiscalWeek", - "SortByColumn": "Fiscal Week Number" + "AttributeType": "FiscalMonthOfYear", + "DataCategory": "MonthOfYear" }, { - "Name": "Fiscal Year Week Number", + "Name": "Fiscal Month In Quarter Number", + "Expression": "__FiscalMonthInQuarterNumber", "DataType": "Int64", - "Expression": "__FiscalYearWeekNumber", "IsHidden": true, - "AttributeType": "FiscalWeeks" + "AttributeType": "FiscalMonthOfQuarter", + "DataCategory": "MonthOfQuarter" }, { - "Name": "Fiscal Year Week", - "DataType": "String", - "Expression": "__FiscalYearWeek", - "SortByColumn": "Fiscal Year Week Number" - }, - { - "Name": "Working Day", - "Expression": "IF ( __IsWorkingDay, __WorkingDayType, __NonWorkingDayType )", + "Name": "Fiscal Quarter", + "Expression": "FORMAT( __FiscalQuarterNumber, \"@_FQ_@0\"@@GETISO() )", "DataType": "String", - "RequiresHolidays": true, - "Annotations": { - "SQLBI_FilterSafe": true - } + "DataCategory": "QuarterOfYear" }, { - "Name": "IsWorking", - "Expression": "__IsWorkingDay", - "DataType": "Boolean", - "RequiresHolidays": true, - "IsHidden": true, - "AttributeType": "IsWorkingDay", - "Annotations": { - "SQLBI_FilterSafe": true - } - }, - { - "Name": "Working Day Value", - "Expression": "IF ( __IsWorkingDay, 1 )", - "DataType": "Int64", - "RequiresHolidays": true, - "IsHidden": true, - "Annotations": { - "SQLBI_FilterSafe": true - } - }, - { - "Name": "Holiday Name", - "Expression": "__HolidayName", + "Name": "Fiscal Year Quarter", + "Expression": "FORMAT ( __FiscalQuarterNumber, \"@_FQ_@0\"@@GETISO() ) & \"-\" & FORMAT ( __FiscalYearNumber, \"0000\"@@GETISO() )", "DataType": "String", - "RequiresHolidays": true, - "Annotations": { - "SQLBI_FilterSafe": true - } + "SortByColumn": "Fiscal Year Quarter Number", + "DataCategory": "Quarters" }, { - "Name": "Day of Week Number", - "Expression": "__WeekDayNumber", + "Name": "Fiscal Year Quarter Number", + "Expression": "__FiscalYearQuarterNumber", "DataType": "Int64", "IsHidden": true, - "AttributeType": "DayOfWeek", - "DataCategory": "DayOfWeek", - "Annotations": { - "SQLBI_FilterSafe": true - } + "AttributeType": "FiscalQuarters", + "DataCategory": "Quarters" }, { - "Name": "Day of Week", - "Expression": "__WeekDay", + "Name": "Fiscal Year", + "Expression": "FORMAT ( __FiscalYearNumber, \"@_FY_@ 0000\"@@GETISO() )", "DataType": "String", - "SortByColumn": "Day of Week Number", - "DataCategory": "DayOfWeek", - "Annotations": { - "SQLBI_FilterSafe": true - } - }, - { - "Name": "Day of Fiscal Month Number", - "Expression": "__FiscalDayOfMonthNumber", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "FiscalDayOfMonth", - "DataCategory": "DayOfMonth" - }, - { - "Name": "Day of Fiscal Quarter Number", - "Expression": "__FiscalDayOfQuarterNumber", - "DataType": "Int64", - "IsHidden": true, - "AttributeType": "FiscalDayOfQuarter", - "DataCategory": "DayOfQuarter" + "SortByColumn": "Fiscal Year Number", + "DataCategory": "Years" }, { - "Name": "Day of Fiscal Year Number", - "Expression": "__FiscalDayOfYearNumber", + "Name": "Fiscal Year Number", + "Expression": "__FiscalYearNumber", "DataType": "Int64", "IsHidden": true, - "AttributeType": "FiscalDayOfYear", - "DataCategory": "DayOfYear" - }, - { - "Name": "DateWithTransactions", - "Expression": "__Date <= __LastTransactionDate", - "DataType": "Boolean", - "IsHidden": true, - "AttributeType": "DateDuration" + "AttributeType": "FiscalYears", + "DataCategory": "Years" } ], "Hierarchies": [ { - "Name": "Year-Month-Week", - "Levels": [ - { - "Name": "Year", - "Column": "Fiscal Year" - }, - { - "Name": "Month", - "Column": "Fiscal Year Month" - }, - { - "Name": "Week", - "Column": "Fiscal Year Week" - } - ] - }, - { - "Name": "Year-Quarter-Month-Week", + "Name": "Fiscal Year-Quarter", "Levels": [ { "Name": "Year", @@ -611,41 +227,20 @@ }, { "Name": "Month", - "Column": "Fiscal Year Month" - }, - { - "Name": "Week", - "Column": "Fiscal Year Week" - } - ] - }, - { - "Name": "Year-Quarter-Week", - "Levels": [ - { - "Name": "Year", - "Column": "Fiscal Year" - }, - { - "Name": "Quarter", - "Column": "Fiscal Year Quarter" - }, - { - "Name": "Week", - "Column": "Fiscal Year Week" + "Column": "Year Month" } ] }, { - "Name": "Year-Week", + "Name": "Fiscal Year-Month", "Levels": [ { "Name": "Year", "Column": "Fiscal Year" }, { - "Name": "Week", - "Column": "Fiscal Year Week" + "Name": "Month", + "Column": "Year Month" } ] } diff --git a/src/Dax.Template.TestUI/Templates/DateTemplate-05.json b/src/Dax.Template.TestUI/Templates/DateTemplate-05.json index 312357d..c7a90e1 100644 --- a/src/Dax.Template.TestUI/Templates/DateTemplate-05.json +++ b/src/Dax.Template.TestUI/Templates/DateTemplate-05.json @@ -1,7 +1,8 @@ { - "_comment": "Reference FY prefix format in DAX expression using the syntax @_FY_@", + "$schema": "https://raw.githubusercontent.com/sql-bi/Bravo/alberto/templateWorkspace/src/Assets/TemplateDevelopment/Schemas/date-template.schema.json", + "_comment": "Reference Custom Calendar + Holidays", "CalendarType": "Calendar", - "FormatPrefixes": [ "Q", "FY", "FQ" ], + "FormatPrefixes": [ "Q" ], "Steps": [ { "Name": "__Calendar", @@ -9,20 +10,42 @@ } ], "GlobalVariables": [ - { - "Name": "__FirstFiscalMonth", - "Expression": "7", - "IsConfigurable": true - }, { "Name": "__FirstDayOfWeek", "Expression": "0", - "IsConfigurable": true + "IsConfigurable": true, + "Comment": "0 = Sunday, 1 = Monday, ..." }, { "Name": "__WorkingDays", "Expression": "@@GETCONFIG( WorkingDays )", "IsConfigurable": true + }, + { + "Name": "__WorkingDayType", + "Expression": "\"Working day\"", + "IsConfigurable": true + }, + { + "Name": "__NonWorkingDayType", + "Expression": "\"Non-working day\"", + "IsConfigurable": true + }, + { + "Name": "__WeekDayCalculationType", + "Expression": "IF ( __FirstDayOfWeek = 0, 7, __FirstDayOfWeek ) + 10" + }, + { + "Name": "__IsStandardLocale", + "Expression": "IF ( FORMAT( DATE( 2000, 1, 1 ), \"oooo\"@@GETISO() ) = \"oooo\", TRUE, FALSE )" + }, + { + "Name": "__DayFormatString", + "Expression": "IF( __IsStandardLocale, \"ddd\", \"aaa\" )" + }, + { + "Name": "__MonthFormatString", + "Expression": "IF( __IsStandardLocale, \"mmm\", \"ooo\" )" } ], "RowVariables": [ @@ -38,25 +61,46 @@ "Name": "__MonthNumber", "Expression": "MONTH ( __Date )" }, + { + "Name": "__DayOfMonthNumber", + "Expression": "DAY ( __Date )" + }, + { + "Name": "__DateKey", + "Expression": "__YearNumber * 10000 + __MonthNumber * 100 + __DayOfMonthNumber" + }, { "Name": "__QuarterNumber", - "Expression": "QUARTER ( __Date )" + "Expression": "ROUNDUP ( __MonthNumber / 3, 0 )" + }, + { + "Name": "__YearQuarterNumber", + "Expression": "CONVERT ( __YearNumber * 4 + __QuarterNumber - 1, INTEGER )" + }, + { + "Name": "__MonthInQuarterNumber", + "Expression": "MOD ( __MonthNumber - 1, 3 ) + 1" }, { - "Name": "__MonthNumberQ", - "Expression": "__MonthNumber - 3 * (__QuarterNumber - 1)" + "Name": "__FirstDayOfYear", + "Expression": "DATE ( __YearNumber, 1, 1 )" }, { - "Name": "__WeekdayNumber", - "Expression": "WEEKDAY ( __Date, 1 ) - 1" + "Name": "__YearDayNumber", + "MultiLineExpression": [ + "SUMX (", + " CALENDAR ( __FirstDayOfYear, __Date ),", + " 1 * ( MONTH ( ''[Date] ) <> 2 || DAY ( ''[Date] ) <> 29 )", + ")" + ] }, { - "Name": "__FiscalYearNumber", - "Expression": "__YearNumber + 1 * ( __FirstFiscalMonth > 1 && __MonthNumber >= __FirstFiscalMonth )" + "Name": "__WeekDayNumber", + "Expression": "WEEKDAY ( __Date, __WeekDayCalculationType )" }, { - "Name": "__FiscalQuarterNumber", - "Expression": "FORMAT ( EOMONTH ( __Date, 1 - __FirstFiscalMonth ), \"@_FQ_@Q\"@@GETISO() )" + "Name": "__WeekDay", + "Expression": "FORMAT ( __Date, __DayFormatString@@GETISO() )" }, { "Name": "__HolidayName", @@ -75,108 +119,146 @@ { "Name": "Date", "DataType": "DateTime", - "FormatString": "m/dd/yyyy", + "FormatString": null, "Step": "__Calendar", "DataCategory": "PaddedDateTableDates", "AttributeTypes": [ - "Date", - "FiscalDate" + "Date" ] }, { - "Name": "Year", - "Expression": "DATE(__YearNumber, 12, 31)", - "DataType": "DateTime", - "FormatString": "yyyy", - "DataCategory": "Years" + "Name": "DateKey", + "Expression": "__DateKey", + "DataType": "Int64", + "IsHidden": true }, { - "Name": "Year Quarter Date", - "Expression": "EOMONTH( __Date, 3 - __MonthNumberQ )", - "DataType": "DateTime", - "FormatString": "m/dd/yyyy", + "Name": "Sequential Day Number", + "Expression": "INT ( __Date )", + "DataType": "Int64", "IsHidden": true, - "DataCategory": "Quarters" + "AttributeType": "ManufacturingDate", + "_comment": "We use ManufacturingDate as a special tag to identify an alternate date to avoid removing the filter on all the columns because of mark as date table" + }, + { + "Name": "Year Month", + "Expression": "FORMAT ( __Date, __MonthFormatString & \" yyyy\"@@GETISO() )", + "DataType": "String", + "SortByColumn": "Year Month Number", + "DataCategory": "Months" + }, + { + "Name": "Year Month Number", + "Expression": "__YearNumber * 12 + __MonthNumber - 1", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "Months", + "DataCategory": "Months" + }, + { + "Name": "Year", + "Expression": "__YearNumber", + "DataType": "Int64", + "AttributeType": "Years", + "DataCategory": "Years" }, { "Name": "Year Quarter", - "_comment": "TODO Add FORMAT argument for localization", - "Expression": "FORMAT( __Date, \"@_Q_@Q-YYYY\")", + "Expression": "FORMAT ( __QuarterNumber, \"@_Q_@0\"@@GETISO() ) & \"-\" & FORMAT ( __YearNumber, \"0000\"@@GETISO() )", "DataType": "String", - "SortByColumn": "Year Quarter Date" + "SortByColumn": "Year Quarter Number", + "DataCategory": "Quarters" + }, + { + "Name": "Year Quarter Number", + "Expression": "__YearQuarterNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "Quarters", + "DataCategory": "Quarters" }, { "Name": "Quarter", - "Expression": "FORMAT( __Date, \"@_Q_@Q\" )", + "Expression": "FORMAT( __QuarterNumber, \"@_Q_@0\"@@GETISO() )", "DataType": "String", "DataCategory": "QuarterOfYear" }, { - "_comment": "Use this version for end-of-month", - "_Name": "Year Month", - "_Expression": "EOMONTH( _Date, 0 )", - "_DataType": "DateTime", - "_comment_1": "Use this version for beginning-of-month", - "Name": "Year Month", - "Expression": "EOMONTH( __Date, -1 ) + 1", - "DataType": "DateTime", - "FormatString": "mmm yyyy", - "DataCategory": "Months" + "Name": "Month", + "Expression": "FORMAT ( __Date, __MonthFormatString@@GETISO() )", + "DataType": "String", + "SortByColumn": "Month Number", + "DataCategory": "MonthOfYear" }, { - "Name": "Month", - "Expression": "DATE(1900, MONTH( __Date ), 1 )", - "DataType": "DateTime", - "FormatString": "mmm", + "Name": "Month Number", + "Expression": "__MonthNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "MonthOfYear", "DataCategory": "MonthOfYear" }, + { + "Name": "Month in Quarter Number", + "Expression": "__MonthInQuarterNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "MonthOfQuarter", + "DataCategory": "MonthOfQuarter" + }, { "Name": "Day of Week", - "Expression": "DATE(1900, 1, 7 + __WeekdayNumber + (7 * (__WeekdayNumber < __FirstDayOfWeek)))", - "DataType": "DateTime", - "FormatString": "ddd", + "Expression": "__WeekDay", + "DataType": "String", + "SortByColumn": "Day of Week Number", + "AttributeType": "DayOfWeek", "DataCategory": "DayOfWeek", "Annotations": { "SQLBI_FilterSafe": true } }, { - "Name": "Fiscal Year", - "Expression": "DATE(__FiscalYearNumber + (__FirstFiscalMonth = 1), __FirstFiscalMonth, 1) - 1", - "DataType": "DateTime", - "FormatString": "@_FY_@ yyyy", - "DisplayFolder": "Fiscal", - "DataCategory": "FiscalYears" + "Name": "Day of Week Number", + "Expression": "__WeekDayNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "DayOfWeek", + "DataCategory": "DayOfWeek", + "Annotations": { + "SQLBI_FilterSafe": true + } }, { - "Name": "Fiscal Year Quarter", - "Expression": "__FiscalQuarterNumber & \"-\" & __FiscalYearNumber", - "DataType": "String", - "SortByColumn": "Fiscal Year Quarter Date", - "DisplayFolder": "Fiscal" + "Name": "Day of Month Number", + "Expression": "__DayOfMonthNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "DayOfMonth", + "DataCategory": "DayOfMonth" }, { - "Name": "Fiscal Year Quarter Date", - "Expression": "EOMONTH( __Date, 3 - __MonthNumberQ )", - "DataType": "DateTime", - "FormatString": "m/dd/yyyy", + "Name": "Day of Year Number", + "Expression": "__YearDayNumber", + "DataType": "Int64", "IsHidden": true, - "DisplayFolder": "Fiscal", - "DataCategory": "FiscalQuarters" + "AttributeType": "DayOfYear", + "DataCategory": "DayOfYear" }, { - "Name": "Fiscal Quarter", - "Expression": "__FiscalQuarterNumber", + "Name": "Working Day", + "Expression": "IF ( __IsWorkingDay, __WorkingDayType, __NonWorkingDayType )", "DataType": "String", - "DisplayFolder": "Fiscal", - "DataCategory": "FiscalQuarterOfYear" + "RequiresHolidays": true, + "Annotations": { + "SQLBI_FilterSafe": true + } }, { "Name": "IsWorking", "Expression": "__IsWorkingDay", "DataType": "Boolean", - "IsHidden": true, "RequiresHolidays": true, + "IsHidden": true, "Annotations": { "SQLBI_FilterSafe": true } @@ -185,8 +267,8 @@ "Name": "Working Day Value", "Expression": "IF ( __IsWorkingDay, 1 )", "DataType": "Int64", - "IsHidden": true, "RequiresHolidays": true, + "IsHidden": true, "Annotations": { "SQLBI_FilterSafe": true } @@ -217,29 +299,12 @@ "Column": "Year" }, { - "Name": "Month", - "Column": "Year Month" - }, - { - "Name": "Date", - "Column": "Date" - } - ] - }, - { - "Name": "Fiscal", - "Levels": [ - { - "Name": "Year", - "Column": "Fiscal Year" + "Name": "Quarter", + "Column": "Year Quarter" }, { "Name": "Month", "Column": "Year Month" - }, - { - "Name": "Date", - "Column": "Date" } ] } diff --git a/src/Dax.Template.TestUI/Templates/DateTemplate-06.json b/src/Dax.Template.TestUI/Templates/DateTemplate-06.json new file mode 100644 index 0000000..c7d3340 --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/DateTemplate-06.json @@ -0,0 +1,352 @@ +{ + "$schema": "https://raw.githubusercontent.com/sql-bi/Bravo/alberto/templateWorkspace/src/Assets/TemplateDevelopment/Schemas/date-template.schema.json", + "_comment": "Reference Custom Fiscal Calendar + Holidays", + "CalendarType": "Fiscal", + "FormatPrefixes": [ "FY", "FQ" ], + "Steps": [ + { + "Name": "__Calendar", + "Expression": "@@GETCALENDAR()" + } + ], + "GlobalVariables": [ + { + "Name": "__FirstFiscalMonth", + "Expression": "3", + "IsConfigurable": true + }, + { + "Name": "__FirstDayOfWeek", + "Expression": "0", + "IsConfigurable": true, + "Comment": "0 = Sunday, 1 = Monday, ..." + }, + { + "Name": "__TypeStartFiscalYear", + "Expression": "1", + "IsConfigurable": true, + "MultiLineComment": [ + "Fiscal year as Calendar Year of :", + "0 - First day of fiscal year", + "1 - Last day of fiscal year" + ] + }, + { + "Name": "__WorkingDays", + "Expression": "@@GETCONFIG( WorkingDays )", + "IsConfigurable": true + }, + { + "Name": "__WorkingDayType", + "Expression": "\"Working day\"", + "IsConfigurable": true + }, + { + "Name": "__NonWorkingDayType", + "Expression": "\"Non-working day\"", + "IsConfigurable": true + }, + { + "Name": "__WeekDayCalculationType", + "Expression": "IF ( __FirstDayOfWeek = 0, 7, __FirstDayOfWeek ) + 10" + }, + { + "Name": "__OffsetFiscalYearBeforeMonth", + "Expression": "IF ( __FirstFiscalMonth > 1, __TypeStartFiscalYear - 1, 0 )" + }, + { + "Name": "__OffsetFiscalYearOnOrAfterMonth", + "Expression": "IF ( __FirstFiscalMonth > 1, __TypeStartFiscalYear, 0 )" + }, + { + "Name": "__IsStandardLocale", + "Expression": "IF ( FORMAT( DATE( 2000, 1, 1 ), \"oooo\"@@GETISO() ) = \"oooo\", TRUE, FALSE )" + }, + { + "Name": "__DayFormatString", + "Expression": "IF( __IsStandardLocale, \"ddd\", \"aaa\" )" + }, + { + "Name": "__MonthFormatString", + "Expression": "IF( __IsStandardLocale, \"mmm\", \"ooo\" )" + } + ], + "RowVariables": [ + { + "Name": "__Date", + "Expression": "[Date]" + }, + { + "Name": "__YearNumber", + "Expression": "YEAR ( __Date )" + }, + { + "Name": "__MonthNumber", + "Expression": "MONTH ( __Date )" + }, + { + "Name": "__DayOfMonthNumber", + "Expression": "DAY ( __Date )" + }, + { + "Name": "__DateKey", + "Expression": "__YearNumber * 10000 + __MonthNumber * 100 + __DayOfMonthNumber" + }, + { + "Name": "__FiscalYearNumber", + "Expression": "__YearNumber + __OffsetFiscalYearOnOrAfterMonth * ( __FirstFiscalMonth > 1 && __MonthNumber >= __FirstFiscalMonth ) + __OffsetFiscalYearBeforeMonth * ( __FirstFiscalMonth > 1 && __MonthNumber < __FirstFiscalMonth )" + }, + { + "Name": "__FiscalMonthNumber", + "Expression": "__MonthNumber - __FirstFiscalMonth + 1 + 12 * (__MonthNumber < __FirstFiscalMonth)" + }, + { + "Name": "__FiscalQuarterNumber", + "Expression": "ROUNDUP ( __FiscalMonthNumber / 3, 0 )" + }, + { + "Name": "__FiscalYearQuarterNumber", + "Expression": "CONVERT ( __FiscalYearNumber * 4 + __FiscalQuarterNumber - 1, INTEGER )" + }, + { + "Name": "__FiscalMonthInQuarterNumber", + "Expression": "MOD ( __FiscalMonthNumber - 1, 3 ) + 1" + }, + { + "Name": "__FirstDayOfYear", + "Expression": "DATE ( __FiscalYearNumber - 1 * (__FirstFiscalMonth > 1), __FirstFiscalMonth, 1 )" + }, + { + "Name": "__FiscalYearDayNumber", + "MultiLineExpression": [ + "SUMX (", + " CALENDAR ( __FirstDayOfYear, __Date ),", + " 1 * ( MONTH ( ''[Date] ) <> 2 || DAY ( ''[Date] ) <> 29 )", + ")" + ] + }, + { + "Name": "__WeekDayNumber", + "Expression": "WEEKDAY ( __Date, __WeekDayCalculationType )" + }, + { + "Name": "__WeekDay", + "Expression": "FORMAT ( __Date, __DayFormatString@@GETISO() )" + }, + { + "Name": "__HolidayName", + "Expression": "@@GETHOLIDAYNAME( __Date )" + }, + { + "Name": "__IsWorkingDay", + "Expression": "WEEKDAY ( __Date, 1 ) IN __WorkingDays && ISBLANK ( __HolidayName )" + }, + { + "Name": "__LastTransactionDate", + "Expression": "@@GETMAXDATE()" + } + ], + "Columns": [ + { + "Name": "Date", + "DataType": "DateTime", + "FormatString": null, + "Step": "__Calendar", + "DataCategory": "PaddedDateTableDates", + "AttributeTypes": [ + "Date", + "FiscalDate" + ] + }, + { + "Name": "DateKey", + "Expression": "__DateKey", + "DataType": "Int64", + "IsHidden": true + }, + { + "Name": "Sequential Day Number", + "Expression": "INT ( __Date )", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "ManufacturingDate", + "_comment": "We use ManufacturingDate as a special tag to identify an alternate date to avoid removing the filter on all the columns because of mark as date table" + }, + { + "Name": "Year Month", + "Expression": "FORMAT ( __Date, __MonthFormatString & \" yyyy\"@@GETISO() )", + "DataType": "String", + "SortByColumn": "Year Month Number", + "DataCategory": "Months" + }, + { + "Name": "Year Month Number", + "Expression": "__YearNumber * 12 + __MonthNumber - 1", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "FiscalMonths", + "DataCategory": "Months" + }, + { + "Name": "Fiscal Year", + "Expression": "FORMAT ( __FiscalYearNumber, \"@_FY_@ 0000\"@@GETISO() )", + "DataType": "String", + "SortByColumn": "Fiscal Year Number", + "DataCategory": "Years" + }, + { + "Name": "Fiscal Year Number", + "Expression": "__FiscalYearNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "FiscalYears", + "DataCategory": "Years" + }, + { + "Name": "Fiscal Year Quarter", + "Expression": "FORMAT ( __FiscalQuarterNumber, \"@_FQ_@0\"@@GETISO() ) & \"-\" & FORMAT ( __FiscalYearNumber, \"0000\"@@GETISO() )", + "DataType": "String", + "SortByColumn": "Fiscal Year Quarter Number", + "DataCategory": "Quarters" + }, + { + "Name": "Fiscal Year Quarter Number", + "Expression": "__FiscalYearQuarterNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "FiscalQuarters", + "DataCategory": "Quarters" + }, + { + "Name": "Fiscal Quarter", + "Expression": "FORMAT( __FiscalQuarterNumber, \"@_FQ_@0\"@@GETISO() )", + "DataType": "String", + "DataCategory": "QuarterOfYear" + }, + { + "Name": "Month", + "Expression": "FORMAT ( __Date, __MonthFormatString@@GETISO() )", + "DataType": "String", + "SortByColumn": "Fiscal Month Number", + "DataCategory": "MonthOfYear" + }, + { + "Name": "Fiscal Month Number", + "Expression": "__FiscalMonthNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "FiscalMonthOfYear", + "DataCategory": "MonthOfYear" + }, + { + "Name": "Fiscal Month in Quarter Number", + "Expression": "__FiscalMonthInQuarterNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "FiscalMonthOfQuarter", + "DataCategory": "MonthOfQuarter" + }, + { + "Name": "Day of Week", + "Expression": "__WeekDay", + "DataType": "String", + "SortByColumn": "Day of Week Number", + "AttributeType": "FiscalDayOfWeek", + "DataCategory": "DayOfWeek", + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Day of Week Number", + "Expression": "__WeekDayNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "FiscalDayOfWeek", + "DataCategory": "DayOfWeek", + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Day of Month Number", + "Expression": "__DayOfMonthNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "FiscalDayOfMonth", + "DataCategory": "DayOfMonth" + }, + { + "Name": "Day of Fiscal Year Number", + "Expression": "__FiscalYearDayNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "FiscalDayOfYear", + "DataCategory": "DayOfYear" + }, + { + "Name": "Working Day", + "Expression": "IF ( __IsWorkingDay, __WorkingDayType, __NonWorkingDayType )", + "DataType": "String", + "RequiresHolidays": true, + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "IsWorking", + "Expression": "__IsWorkingDay", + "DataType": "Boolean", + "RequiresHolidays": true, + "IsHidden": true, + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Working Day Value", + "Expression": "IF ( __IsWorkingDay, 1 )", + "DataType": "Int64", + "RequiresHolidays": true, + "IsHidden": true, + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Holiday Name", + "Expression": "__HolidayName", + "DataType": "String", + "RequiresHolidays": true, + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "DateWithTransactions", + "Expression": "__Date <= __LastTransactionDate", + "DataType": "Boolean", + "IsHidden": true, + "AttributeType": "DateDuration" + } + ], + "Hierarchies": [ + { + "Name": "Fiscal", + "Levels": [ + { + "Name": "Year", + "Column": "Fiscal Year" + }, + { + "Name": "Quarter", + "Column": "Fiscal Year Quarter" + }, + { + "Name": "Month", + "Column": "Year Month" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/DateTemplate-07.json b/src/Dax.Template.TestUI/Templates/DateTemplate-07.json new file mode 100644 index 0000000..2483b03 --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/DateTemplate-07.json @@ -0,0 +1,653 @@ +{ + "_comment": "Reference Weekly Calendar + Holidays", + "CalendarType": "Weekly", + "FormatPrefixes": [ "Q", "FY", "FQ", "FM", "FW" ], + "Steps": [ + { + "Name": "__GenerateFiscalYears", + "MultiLineExpression": [ + "SELECTCOLUMNS (", + " GENERATESERIES ( __FirstYear - __OffsetFiscalYear, __LastYear + __OffsetFiscalYear, 1 ),", + " \"@YearNumber\", ''[Value]", + ")" + ] + }, + { + "Name": "__Calendar", + "MultiLineExpression": [ + "GENERATE (", + " __GenerateFiscalYears,", + " VAR _StartFiscalYearNumber = [@YearNumber] - ( __OffsetFiscalYear * __TypeStartFiscalYear )", + " VAR _FirstDayCurrentYear = DATE ( _StartFiscalYearNumber, __FirstFiscalMonth, 1 )", + " VAR _FirstDayNextYear = DATE ( _StartFiscalYearNumber + 1, __FirstFiscalMonth, 1 )", + " VAR _DayOfWeekNumberCurrentYear = WEEKDAY ( _FirstDayCurrentYear, __WeekDayCalculationType )", + " VAR _OffsetStartCurrentFiscalYear =", + " SWITCH (", + " __WeeklyType,", + " \"Last\", 1 - _DayOfWeekNumberCurrentYear,", + " \"Nearest\", IF (", + " _DayOfWeekNumberCurrentYear >= 5,", + " 8 - _DayOfWeekNumberCurrentYear,", + " 1 - _DayOfWeekNumberCurrentYear", + " ),", + " ERROR ( \"Unknown WeeklyType definition\" )", + " )", + " VAR _DayOfWeekNumberNextYear = WEEKDAY ( _FirstDayNextYear, __WeekDayCalculationType )", + " VAR _OffsetStartNextFiscalYear =", + " SWITCH (", + " __WeeklyType,", + " \"Last\", - _DayOfWeekNumberNextYear,", + " \"Nearest\", IF (", + " _DayOfWeekNumberNextYear >= 5,", + " 7 - _DayOfWeekNumberNextYear,", + " - _DayOfWeekNumberNextYear", + " ),", + " ERROR ( \"Unknown WeeklyType definition\" )", + " )", + " VAR _FirstDayOfFiscalYear = _FirstDayCurrentYear + _OffsetStartCurrentFiscalYear", + " VAR _LastDayOfFiscalYear = _FirstDayNextYear + _OffsetStartNextFiscalYear", + " RETURN", + " GENERATE (", + " ROW ( \"@StartOfYear\", _FirstDayOfFiscalYear, \"@EndOfYear\", _LastDayOfFiscalYear ),", + " CALENDAR ( _FirstDayOfFiscalYear, _LastDayOfFiscalYear )", + " )", + ")" + ] + } + ], + "GlobalVariables": [ + { + "Name": "__FirstFiscalMonth", + "Expression": "1", + "IsConfigurable": true, + "Comment": "First month of the fiscal year" + }, + { + "Name": "__FirstDayOfWeek", + "Expression": "0", + "IsConfigurable": true, + "Comment": "0 = Sunday, 1 = Monday, ..." + }, + { + "Name": "__TypeStartFiscalYear", + "Expression": "1", + "IsConfigurable": true, + "MultiLineComment": [ + "Fiscal year as Calendar Year of :", + "0 - First day of fiscal year", + "1 - Last day of fiscal year" + ] + }, + { + "Name": "__QuarterWeekType", + "Expression": "\"445\"", + "IsConfigurable": true, + "Comment": "Supports only 445, 454, and 544" + }, + { + "Name": "__WeeklyType", + "Expression": "\"Last\"", + "IsConfigurable": true, + "MultiLineComment": [ + "Supports only Nearest or Last", + "Last: for last weekday of the month at fiscal year end", + "Nearest: for last weekday nearest the end of month", + "Reference for Last/Nearest definition: https://en.wikipedia.org/wiki/4%E2%80%934%E2%80%935_calendar)" + ] + }, + { + "Name": "__WorkingDays", + "Expression": "@@GETCONFIG( WorkingDays )", + "IsConfigurable": true, + "Comment": "Set the working days - 0 = Sunday, 1 = Monday, ... 6 = Saturday" + }, + { + "Name": "__WorkingDayType", + "Expression": "\"Working day\"", + "IsConfigurable": true, + "Comment": "Description of working daysfor Working Day column" + }, + { + "Name": "__NonWorkingDayType", + "Expression": "\"Non-working day\"", + "IsConfigurable": true, + "Comment": "Description of non-working days for Working Day column" + }, + { + "Name": "__OffsetYears", + "Expression": "1", + "IsConfigurable": true, + "Comment": "Increase range of fiscal years before/after boundaries defined" + }, + { + "Name": "__FirstTransactionDate", + "Expression": "@@GETMINDATE()" + }, + { + "Name": "__LastTransactionDate", + "Expression": "@@GETMAXDATE()" + }, + { + "Name": "__FirstYearTransaction", + "MultiLineExpression": [ + "YEAR ( __FirstTransactionDate )", + " + 1 * ( MONTH ( __FirstTransactionDate ) >= __FirstFiscalMonth", + " && __FirstFiscalMonth > 1 )" + ] + }, + { + "Name": "__LastYearTransaction", + "MultiLineExpression": [ + "YEAR ( __LastTransactionDate )", + " + 1 * ( MONTH ( __LastTransactionDate ) >= __FirstFiscalMonth", + " && __FirstFiscalMonth > 1 )" + ] + }, + { + "Name": "__FirstYear", + "Expression": "@@GETMINYEAR( __FirstYearTransaction )" + }, + { + "Name": "__LastYear", + "Expression": "@@GETMAXYEAR( __LastYearTransaction )" + }, + { + "Name": "__FirstDayCalendar", + "Expression": "DATE ( __FirstYear - 1, 1, 1 )" + }, + { + "Name": "__LastDayCalendar", + "Expression": "DATE ( __LastYear + 1, 12, 31 )" + }, + { + "Name": "__WeekDayCalculationType", + "Expression": "IF ( __FirstDayOfWeek = 0, 7, __FirstDayOfWeek ) + 10" + }, + { + "Name": "__OffsetFiscalYear", + "Expression": "IF ( __FirstFiscalMonth > 1, __OffsetYears, 0 )" + }, + { + "Name": "__WeeksInP1", + "MultiLineExpression": [ + "SWITCH (", + " __QuarterWeekType,", + " \"445\", 4,", + " \"454\", 4,", + " \"544\", 5,", + " ERROR ( \"__QuarterWeekType only supports 445, 454, and 544\" )", + ")" + ] + }, + { + "Name": "__WeeksInP2", + "MultiLineExpression": [ + "SWITCH (", + " __QuarterWeekType,", + " \"445\", 4,", + " \"454\", 5,", + " \"544\", 4,", + " ERROR ( \"__QuarterWeekType only supports 445, 454, and 544\" )", + ")" + ] + }, + { + "Name": "__WeeksInP3", + "MultiLineExpression": [ + "SWITCH (", + " __QuarterWeekType,", + " \"445\", 5,", + " \"454\", 4,", + " \"544\", 4,", + " ERROR ( \"__QuarterWeekType only supports 445, 454, and 544\" )", + ")" + ] + }, + { + "Name": "__FirstSundayReference", + "Expression": "DATE ( 1900, 12, 30 )", + "Comment": "Do not change this" + }, + { + "Name": "__FirstWeekReference", + "Expression": "__FirstSundayReference + __FirstDayOfWeek" + }, + { + "Name": "__IsStandardLocale", + "Expression": "IF ( FORMAT( DATE( 2000, 1, 1 ), \"oooo\"@@GETISO() ) = \"oooo\", TRUE, FALSE )" + }, + { + "Name": "__DayFormatString", + "Expression": "IF( __IsStandardLocale, \"ddd\", \"aaa\" )" + }, + { + "Name": "__MonthFormatString", + "Expression": "IF( __IsStandardLocale, \"mmm\", \"ooo\" )" + } + ], + "RowVariables": [ + { + "Name": "__Date", + "Expression": "[Date]" + }, + { + "Name": "__FiscalYearNumber", + "Expression": "[@YearNumber]" + }, + { + "Name": "__FiscalYear", + "Expression": "FORMAT ( __FiscalYearNumber, \"@_FY_@ 0000\"@@GETISO() )" + }, + { + "Name": "__FiscalDayOfYearNumber", + "Expression": "INT ( __Date - [@StartOfYear] + 1 )" + }, + { + "Name": "__FiscalWeekNumber", + "Expression": "INT ( CEILING ( __FiscalDayOfYearNumber / 7, 1 ) )" + }, + { + "Name": "__FiscalWeek", + "Expression": "FORMAT ( __FiscalWeekNumber, \"@_FW_@00\" )" + }, + { + "Name": "__FiscalYearWeekNumber", + "Expression": "INT ( DIVIDE ( __Date - __FirstWeekReference, 7 ) ) + 1" + }, + { + "Name": "__FiscalYearWeek", + "Expression": "FORMAT ( __FiscalWeekNumber, \"@_FW_@00\" ) & \"-\" & __FiscalYearNumber" + }, + { + "Name": "__FiscalQuarterNumber", + "Expression": "IF ( __FiscalWeekNumber > 52, 4, ROUNDUP ( __FiscalWeekNumber / 13, 0 ) )" + }, + { + "Name": "__FiscalQuarter", + "Expression": "FORMAT ( __FiscalYearNumber, \"@_FY_@ 0000\"@@GETISO() )" + }, + { + "Name": "__FiscalWeekInQuarterNumber", + "Expression": "IF ( __FiscalWeekNumber > 52, 14, __FiscalWeekNumber - 13 * ( __FiscalQuarterNumber - 1 ) )" + }, + { + "Name": "__FiscalYearMonthNumber", + "Expression": "__FiscalYearNumber * 12 - 1 + __FiscalMonthNumber" + }, + { + "Name": "__FiscalYearMonth", + "Expression": "FORMAT ( __FiscalStartOfMonth + 14, \"@_FM_@ \" & __MonthFormatString & \" yyyy\"@@GETISO() )" + }, + { + "Name": "__FiscalStartOfMonth", + "MultiLineExpression": [ + "MINX (", + " FILTER ( @@GETLASTSTEP() , [Fiscal Year Month Number] = __FiscalYearMonthNumber ),", + " [Date]", + ")" + ] + }, + { + "Name": "__FiscalStartOfQuarter", + "MultiLineExpression": [ + "MINX (", + " FILTER ( @@GETLASTSTEP() , [Fiscal Year Quarter Number] = __FiscalYearQuarterNumber ),", + " [Date]", + ")" + ] + }, + { + "Name": "__FiscalMonthNumber", + "MultiLineExpression": [ + "( __FiscalQuarterNumber - 1 ) * 3", + " + SWITCH (", + " TRUE,", + " __FiscalWeekInQuarterNumber <= __WeeksInP1, 1,", + " __FiscalWeekInQuarterNumber <= ( __WeeksInP1 + __WeeksInP2 ), 2,", + " 3", + " )" + ] + }, + { + "Name": "__FiscalMonth", + "Expression": "FORMAT ( __FiscalStartOfMonth + 14, \"@_FM_@ \" & __MonthFormatString@@GETISO() )" + }, + { + "Name": "__FiscalYearQuarterNumber", + "Expression": "__FiscalYearNumber * 4 - 1 + __FiscalQuarterNumber" + }, + { + "Name": "__FiscalYearQuarter", + "Expression": "\"FQ\" & __FiscalQuarterNumber & \"-\" & __FiscalYearNumber" + }, + { + "Name": "__HolidayName", + "Expression": "@@GETHOLIDAYNAME( __Date )" + }, + { + "Name": "__IsWorkingDay", + "Expression": "WEEKDAY ( __Date, 1 ) IN __WorkingDays && ISBLANK ( __HolidayName )" + }, + { + "Name": "__WeekDayNumber", + "Expression": "WEEKDAY ( __Date, __WeekDayCalculationType )" + }, + { + "Name": "__WeekDay", + "Expression": "FORMAT ( __Date, __DayFormatString@@GETISO() )" + }, + { + "Name": "__FiscalDayOfMonthNumber", + "Expression": "INT ( __Date - __FiscalStartOfMonth + 1 )" + }, + { + "Name": "__FiscalDayOfQuarterNumber", + "Expression": "INT ( __Date - __FiscalStartOfQuarter + 1 )" + }, + { + "Name": "__LastTransactionDate", + "Expression": "@@GETMAXDATE()" + } + ], + "Columns": [ + { + "Name": "@StartOfYear", + "DataType": "Int64", + "IsTemporary": true, + "Step": "__Calendar" + }, + { + "Name": "@EndOfYear", + "DataType": "Int64", + "IsTemporary": true, + "Step": "__Calendar" + }, + { + "Name": "@YearNumber", + "DataType": "Int64", + "IsTemporary": true, + "Step": "__GenerateFiscalYears" + }, + { + "Name": "Date", + "DataType": "DateTime", + "FormatString": null, + "Step": "__Calendar", + "DataCategory": "PaddedDateTableDates", + "AttributeTypes": [ + "Date", + "FiscalDate" + ] + }, + { + "Name": "Sequential Day Number", + "DataType": "Int64", + "Expression": "INT ( __Date )", + "IsHidden": true, + "AttributeType": "ManufacturingDate", + "_comment": "We use ManufacturingDate as a special tag to identify an alternate date to avoid removing the filter on all the columns because of mark as date table" + }, + { + "Name": "Fiscal Year Number", + "DataType": "Int64", + "Expression": "__FiscalYearNumber", + "IsHidden": true, + "AttributeType": "FiscalYears", + "DataCategory": "Years" + }, + { + "Name": "Fiscal Year", + "DataType": "String", + "Expression": "__FiscalYear", + "SortByColumn": "Fiscal Year Number", + "DataCategory": "Years" + }, + { + "Name": "Fiscal Quarter Number", + "DataType": "Int64", + "Expression": "__FiscalQuarterNumber", + "IsHidden": true, + "AttributeType": "FiscalQuarterOfYear", + "DataCategory": "Quarters" + }, + { + "Name": "Fiscal Quarter", + "DataType": "String", + "Expression": "__FiscalQuarter", + "SortByColumn": "Fiscal Quarter Number", + "DataCategory": "Quarters" + }, + { + "Name": "Fiscal Year Quarter Number", + "DataType": "Int64", + "Expression": "__FiscalYearQuarterNumber", + "IsHidden": true, + "AttributeType": "FiscalQuarters", + "DataCategory": "Quarters" + }, + { + "Name": "Fiscal Year Quarter", + "DataType": "String", + "Expression": "__FiscalYearQuarter", + "SortByColumn": "Fiscal Year Quarter Number", + "DataCategory": "Quarters" + }, + { + "Name": "Fiscal Month Number", + "DataType": "Int64", + "Expression": "__FiscalMonthNumber", + "IsHidden": true, + "AttributeType": "FiscalMonthOfYear", + "DataCategory": "MonthOfYear" + }, + { + "Name": "Fiscal Month", + "DataType": "String", + "Expression": "__FiscalMonth", + "SortByColumn": "Fiscal Month Number", + "DataCategory": "MonthOfYear" + }, + { + "Name": "Fiscal Year Month Number", + "DataType": "Int64", + "Expression": "__FiscalYearMonthNumber", + "IsHidden": true, + "AttributeType": "FiscalMonths", + "DataCategory": "Months" + }, + { + "Name": "Fiscal Year Month", + "DataType": "String", + "Expression": "__FiscalYearMonth", + "SortByColumn": "Fiscal Year Month Number", + "DataCategory": "Months" + }, + { + "Name": "Fiscal Week Number", + "DataType": "Int64", + "Expression": "__FiscalWeekNumber", + "IsHidden": true, + "AttributeType": "FiscalWeekOfYear" + }, + { + "Name": "Fiscal Week", + "DataType": "String", + "Expression": "__FiscalWeek", + "SortByColumn": "Fiscal Week Number" + }, + { + "Name": "Fiscal Year Week Number", + "DataType": "Int64", + "Expression": "__FiscalYearWeekNumber", + "IsHidden": true, + "AttributeType": "FiscalWeeks" + }, + { + "Name": "Fiscal Year Week", + "DataType": "String", + "Expression": "__FiscalYearWeek", + "SortByColumn": "Fiscal Year Week Number" + }, + { + "Name": "Working Day", + "Expression": "IF ( __IsWorkingDay, __WorkingDayType, __NonWorkingDayType )", + "DataType": "String", + "RequiresHolidays": true, + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "IsWorking", + "Expression": "__IsWorkingDay", + "DataType": "Boolean", + "RequiresHolidays": true, + "IsHidden": true, + "AttributeType": "IsWorkingDay", + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Working Day Value", + "Expression": "IF ( __IsWorkingDay, 1 )", + "DataType": "Int64", + "RequiresHolidays": true, + "IsHidden": true, + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Holiday Name", + "Expression": "__HolidayName", + "DataType": "String", + "RequiresHolidays": true, + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Day of Week Number", + "Expression": "__WeekDayNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "DayOfWeek", + "DataCategory": "DayOfWeek", + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Day of Week", + "Expression": "__WeekDay", + "DataType": "String", + "SortByColumn": "Day of Week Number", + "DataCategory": "DayOfWeek", + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Day of Fiscal Month Number", + "Expression": "__FiscalDayOfMonthNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "FiscalDayOfMonth", + "DataCategory": "DayOfMonth" + }, + { + "Name": "Day of Fiscal Quarter Number", + "Expression": "__FiscalDayOfQuarterNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "FiscalDayOfQuarter", + "DataCategory": "DayOfQuarter" + }, + { + "Name": "Day of Fiscal Year Number", + "Expression": "__FiscalDayOfYearNumber", + "DataType": "Int64", + "IsHidden": true, + "AttributeType": "FiscalDayOfYear", + "DataCategory": "DayOfYear" + }, + { + "Name": "DateWithTransactions", + "Expression": "__Date <= __LastTransactionDate", + "DataType": "Boolean", + "IsHidden": true, + "AttributeType": "DateDuration" + } + ], + "Hierarchies": [ + { + "Name": "Year-Month-Week", + "Levels": [ + { + "Name": "Year", + "Column": "Fiscal Year" + }, + { + "Name": "Month", + "Column": "Fiscal Year Month" + }, + { + "Name": "Week", + "Column": "Fiscal Year Week" + } + ] + }, + { + "Name": "Year-Quarter-Month-Week", + "Levels": [ + { + "Name": "Year", + "Column": "Fiscal Year" + }, + { + "Name": "Quarter", + "Column": "Fiscal Year Quarter" + }, + { + "Name": "Month", + "Column": "Fiscal Year Month" + }, + { + "Name": "Week", + "Column": "Fiscal Year Week" + } + ] + }, + { + "Name": "Year-Quarter-Week", + "Levels": [ + { + "Name": "Year", + "Column": "Fiscal Year" + }, + { + "Name": "Quarter", + "Column": "Fiscal Year Quarter" + }, + { + "Name": "Week", + "Column": "Fiscal Year Week" + } + ] + }, + { + "Name": "Year-Week", + "Levels": [ + { + "Name": "Year", + "Column": "Fiscal Year" + }, + { + "Name": "Week", + "Column": "Fiscal Year Week" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/DateTemplate-95.json b/src/Dax.Template.TestUI/Templates/DateTemplate-95.json new file mode 100644 index 0000000..312357d --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/DateTemplate-95.json @@ -0,0 +1,247 @@ +{ + "_comment": "Reference FY prefix format in DAX expression using the syntax @_FY_@", + "CalendarType": "Calendar", + "FormatPrefixes": [ "Q", "FY", "FQ" ], + "Steps": [ + { + "Name": "__Calendar", + "Expression": "@@GETCALENDAR()" + } + ], + "GlobalVariables": [ + { + "Name": "__FirstFiscalMonth", + "Expression": "7", + "IsConfigurable": true + }, + { + "Name": "__FirstDayOfWeek", + "Expression": "0", + "IsConfigurable": true + }, + { + "Name": "__WorkingDays", + "Expression": "@@GETCONFIG( WorkingDays )", + "IsConfigurable": true + } + ], + "RowVariables": [ + { + "Name": "__Date", + "Expression": "[Date]" + }, + { + "Name": "__YearNumber", + "Expression": "YEAR ( __Date )" + }, + { + "Name": "__MonthNumber", + "Expression": "MONTH ( __Date )" + }, + { + "Name": "__QuarterNumber", + "Expression": "QUARTER ( __Date )" + }, + { + "Name": "__MonthNumberQ", + "Expression": "__MonthNumber - 3 * (__QuarterNumber - 1)" + }, + { + "Name": "__WeekdayNumber", + "Expression": "WEEKDAY ( __Date, 1 ) - 1" + }, + { + "Name": "__FiscalYearNumber", + "Expression": "__YearNumber + 1 * ( __FirstFiscalMonth > 1 && __MonthNumber >= __FirstFiscalMonth )" + }, + { + "Name": "__FiscalQuarterNumber", + "Expression": "FORMAT ( EOMONTH ( __Date, 1 - __FirstFiscalMonth ), \"@_FQ_@Q\"@@GETISO() )" + }, + { + "Name": "__HolidayName", + "Expression": "@@GETHOLIDAYNAME( __Date )" + }, + { + "Name": "__IsWorkingDay", + "Expression": "WEEKDAY ( __Date, 1 ) IN __WorkingDays && ISBLANK ( __HolidayName )" + }, + { + "Name": "__LastTransactionDate", + "Expression": "@@GETMAXDATE()" + } + ], + "Columns": [ + { + "Name": "Date", + "DataType": "DateTime", + "FormatString": "m/dd/yyyy", + "Step": "__Calendar", + "DataCategory": "PaddedDateTableDates", + "AttributeTypes": [ + "Date", + "FiscalDate" + ] + }, + { + "Name": "Year", + "Expression": "DATE(__YearNumber, 12, 31)", + "DataType": "DateTime", + "FormatString": "yyyy", + "DataCategory": "Years" + }, + { + "Name": "Year Quarter Date", + "Expression": "EOMONTH( __Date, 3 - __MonthNumberQ )", + "DataType": "DateTime", + "FormatString": "m/dd/yyyy", + "IsHidden": true, + "DataCategory": "Quarters" + }, + { + "Name": "Year Quarter", + "_comment": "TODO Add FORMAT argument for localization", + "Expression": "FORMAT( __Date, \"@_Q_@Q-YYYY\")", + "DataType": "String", + "SortByColumn": "Year Quarter Date" + }, + { + "Name": "Quarter", + "Expression": "FORMAT( __Date, \"@_Q_@Q\" )", + "DataType": "String", + "DataCategory": "QuarterOfYear" + }, + { + "_comment": "Use this version for end-of-month", + "_Name": "Year Month", + "_Expression": "EOMONTH( _Date, 0 )", + "_DataType": "DateTime", + "_comment_1": "Use this version for beginning-of-month", + "Name": "Year Month", + "Expression": "EOMONTH( __Date, -1 ) + 1", + "DataType": "DateTime", + "FormatString": "mmm yyyy", + "DataCategory": "Months" + }, + { + "Name": "Month", + "Expression": "DATE(1900, MONTH( __Date ), 1 )", + "DataType": "DateTime", + "FormatString": "mmm", + "DataCategory": "MonthOfYear" + }, + { + "Name": "Day of Week", + "Expression": "DATE(1900, 1, 7 + __WeekdayNumber + (7 * (__WeekdayNumber < __FirstDayOfWeek)))", + "DataType": "DateTime", + "FormatString": "ddd", + "DataCategory": "DayOfWeek", + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Fiscal Year", + "Expression": "DATE(__FiscalYearNumber + (__FirstFiscalMonth = 1), __FirstFiscalMonth, 1) - 1", + "DataType": "DateTime", + "FormatString": "@_FY_@ yyyy", + "DisplayFolder": "Fiscal", + "DataCategory": "FiscalYears" + }, + { + "Name": "Fiscal Year Quarter", + "Expression": "__FiscalQuarterNumber & \"-\" & __FiscalYearNumber", + "DataType": "String", + "SortByColumn": "Fiscal Year Quarter Date", + "DisplayFolder": "Fiscal" + }, + { + "Name": "Fiscal Year Quarter Date", + "Expression": "EOMONTH( __Date, 3 - __MonthNumberQ )", + "DataType": "DateTime", + "FormatString": "m/dd/yyyy", + "IsHidden": true, + "DisplayFolder": "Fiscal", + "DataCategory": "FiscalQuarters" + }, + { + "Name": "Fiscal Quarter", + "Expression": "__FiscalQuarterNumber", + "DataType": "String", + "DisplayFolder": "Fiscal", + "DataCategory": "FiscalQuarterOfYear" + }, + { + "Name": "IsWorking", + "Expression": "__IsWorkingDay", + "DataType": "Boolean", + "IsHidden": true, + "RequiresHolidays": true, + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Working Day Value", + "Expression": "IF ( __IsWorkingDay, 1 )", + "DataType": "Int64", + "IsHidden": true, + "RequiresHolidays": true, + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "Holiday Name", + "Expression": "__HolidayName", + "DataType": "String", + "RequiresHolidays": true, + "Annotations": { + "SQLBI_FilterSafe": true + } + }, + { + "Name": "DateWithTransactions", + "Expression": "__Date <= __LastTransactionDate", + "DataType": "Boolean", + "IsHidden": true, + "AttributeType": "DateDuration" + } + ], + "Hierarchies": [ + { + "Name": "Calendar", + "Levels": [ + { + "Name": "Year", + "Column": "Year" + }, + { + "Name": "Month", + "Column": "Year Month" + }, + { + "Name": "Date", + "Column": "Date" + } + ] + }, + { + "Name": "Fiscal", + "Levels": [ + { + "Name": "Year", + "Column": "Fiscal Year" + }, + { + "Name": "Month", + "Column": "Year Month" + }, + { + "Name": "Date", + "Column": "Date" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/TimeIntelligence-01.json b/src/Dax.Template.TestUI/Templates/TimeIntelligence-01.json index ef6284f..7f46e47 100644 --- a/src/Dax.Template.TestUI/Templates/TimeIntelligence-01.json +++ b/src/Dax.Template.TestUI/Templates/TimeIntelligence-01.json @@ -1,7 +1,6 @@ { "_comment": "Standard Time Intelligence", "_comment1": "NOTE: current version does not support filter safe filters (Day of Week, Working Days, Holidays)", - "_comment2": "NOTE: current version does not support fiscal calculations", "TargetTable": { "SQLBI_CalendarType": "Calendar" }, @@ -392,7 +391,7 @@ ] }, { - "Name": "QTDOPQ %", + "Name": "QDTOPQ %", "DisplayFolder": "Growth over full period", "FormatString": "0.00%", "MultiLineExpression": [ diff --git a/src/Dax.Template.TestUI/Templates/TimeIntelligence-02.json b/src/Dax.Template.TestUI/Templates/TimeIntelligence-02.json index 1cb9882..20856f3 100644 --- a/src/Dax.Template.TestUI/Templates/TimeIntelligence-02.json +++ b/src/Dax.Template.TestUI/Templates/TimeIntelligence-02.json @@ -1,64 +1,90 @@ { - "_comment": "Monthly Time Intelligence (Calendar)", - "_comment1": "Create parameters to pass (and translate?) folder names (or part of folder names?)", + "_comment": "Standard Fiscal Time Intelligence", + "_comment1": "NOTE: current version does not support filter safe filters (Day of Week, Working Days, Holidays)", "TargetTable": { - "SQLBI_CalendarType": "Calendar" + "SQLBI_CalendarType": "Fiscal" }, "TemplateAnnotations": { "SQLBI_Template": "TimeIntelligence", - "SQLBI_TimeIntelligence": "Monthly", - "SQLBI_CalendarType": "Calendar" + "SQLBI_TimeIntelligence": "Standard", + "SQLBI_CalendarType": "Fiscal" }, "MeasureTemplates": [ + { + "Name": "_ShowValueForDates", + "IsHidden": true, + "IsSingleInstance": true, + "MultiLineComment": [ + "Returns TRUE if the period selected is earlier", + "than the last period with data." + ], + "MultiLineExpression": [ + "VAR __LastDateWithData =", + " CALCULATE (", + " @@GETMAXDATE(),", + " REMOVEFILTERS ()", + " )", + "VAR __FirstDateVisible =", + " MIN ( @_C-SQLBI_AttributeTypes-Date_@ )", + "VAR __Result =", + " __FirstDateVisible <= __LastDateWithData", + "RETURN", + " __Result" + ] + }, { "Name": "YTD", "DisplayFolder": "To-date total", "MultiLineExpression": [ - "VAR __LastMonthAvailable = MAX ( @_C-SQLBI_AttributeTypes-Months_@ )", - "VAR __LastYearAvailable = MAX ( @_C-SQLBI_AttributeTypes-Years_@ )", - "VAR __Result =", + "IF (", + " [_ShowValueForDates],", " CALCULATE (", " @@GETMEASURE(),", - " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", - " @_C-SQLBI_AttributeTypes-Months_@ <= __LastMonthAvailable,", - " @_C-SQLBI_AttributeTypes-Years_@ = __LastYearAvailable", + " DATESYTD ( @_C-SQLBI_AttributeTypes-Date_@, @@GETYEARENDFROMFIRSTMONTHVARIABLE(__FirstFiscalMonth) )", " )", - "RETURN", - " __Result" + ")" ] }, { "Name": "QTD", "DisplayFolder": "To-date total", "MultiLineExpression": [ - "VAR __LastMonthAvailable = MAX ( @_C-SQLBI_AttributeTypes-Months_@ )", - "VAR __LastYearQuarterAvailable = MAX ( @_C-SQLBI_AttributeTypes-Quarters_@ )", - "VAR __Result =", + "IF (", + " [_ShowValueForDates],", " CALCULATE (", " @@GETMEASURE(),", - " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", - " @_C-SQLBI_AttributeTypes-Months_@ <= __LastMonthAvailable,", - " @_C-SQLBI_AttributeTypes-Quarters_@ = __LastYearQuarterAvailable", + " DATESQTD ( @_C-SQLBI_AttributeTypes-Date_@ )", " )", - "RETURN", - " __Result" + ")" + ] + }, + { + "Name": "MTD", + "DisplayFolder": "To-date total", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " CALCULATE (", + " @@GETMEASURE(),", + " DATESMTD ( @_C-SQLBI_AttributeTypes-Date_@ )", + " )", + ")" ] }, { "Name": "PY", "DisplayFolder": "Growth", "MultiLineExpression": [ - "VAR __CurrentYearNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Years_@ )", - "VAR __PreviousYearNumber = __CurrentYearNumber - 1", - "VAR __Result =", + "IF (", + " [_ShowValueForDates],", " CALCULATE (", " @@GETMEASURE(),", - " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", - " @_C-SQLBI_AttributeTypes-Years_@ = __PreviousYearNumber,", - " VALUES ( @_C-SQLBI_AttributeTypes-MonthOfYear_@ )", + " CALCULATETABLE (", + " DATEADD ( @_C-SQLBI_AttributeTypes-Date_@, -1, YEAR ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", " )", - "RETURN", - " __Result" + ")" ] }, { @@ -81,7 +107,7 @@ "DisplayFolder": "Growth", "FormatString": "0.00%", "MultiLineExpression": [ - "DIVIDE (", + "DIVIDE ( ", " @@GETMEASURE( YOY ),", " @@GETMEASURE( PY )", ")" @@ -91,17 +117,16 @@ "Name": "PQ", "DisplayFolder": "Growth", "MultiLineExpression": [ - "VAR __CurrentYearQuarterNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Quarters_@ )", - "VAR __PreviousYearQuarterNumber = __CurrentYearQuarterNumber - 1", - "VAR __Result =", + "IF (", + " [_ShowValueForDates],", " CALCULATE (", " @@GETMEASURE(),", - " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", - " @_C-SQLBI_AttributeTypes-Quarters_@ = __PreviousYearQuarterNumber,", - " VALUES ( @_C-SQLBI_AttributeTypes-MonthOfQuarter_@ )", + " CALCULATETABLE (", + " DATEADD ( @_C-SQLBI_AttributeTypes-Date_@, -1, QUARTER ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", " )", - "RETURN", - " __Result" + ")" ] }, { @@ -124,7 +149,7 @@ "DisplayFolder": "Growth", "FormatString": "0.00%", "MultiLineExpression": [ - "DIVIDE (", + "DIVIDE ( ", " @@GETMEASURE( QOQ ),", " @@GETMEASURE( PQ )", ")" @@ -134,16 +159,16 @@ "Name": "PM", "DisplayFolder": "Growth", "MultiLineExpression": [ - "VAR __CurrentYearMonthNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Months_@ )", - "VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - 1", - "VAR __Result =", + "IF (", + " [_ShowValueForDates],", " CALCULATE (", " @@GETMEASURE(),", - " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", - " @_C-SQLBI_AttributeTypes-Months_@ = __PreviousYearMonthNumber", + " CALCULATETABLE (", + " DATEADD ( @_C-SQLBI_AttributeTypes-Date_@, -1, MONTH ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", " )", - "RETURN", - " __Result" + ")" ] }, { @@ -166,7 +191,7 @@ "DisplayFolder": "Growth", "FormatString": "0.00%", "MultiLineExpression": [ - "DIVIDE (", + "DIVIDE ( ", " @@GETMEASURE( MOM ),", " @@GETMEASURE( PM )", ")" @@ -176,18 +201,16 @@ "Name": "PYTD", "DisplayFolder": "To-date growth", "MultiLineExpression": [ - "VAR __LastMonthInYearAvailable = MAX ( @_C-SQLBI_AttributeTypes-MonthOfYear_@ )", - "VAR __LastYearAvailable = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Years_@ )", - "VAR __PreviousYearAvailable = __LastYearAvailable - 1", - "VAR __Result =", + "IF (", + " [_ShowValueForDates],", " CALCULATE (", - " @@GETMEASURE(),", - " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", - " @_C-SQLBI_AttributeTypes-MonthOfYear_@ <= __LastMonthInYearAvailable,", - " @_C-SQLBI_AttributeTypes-Years_@ = __PreviousYearAvailable", + " @@GETMEASURE( YTD ),", + " CALCULATETABLE (", + " DATEADD ( @_C-SQLBI_AttributeTypes-Date_@, -1, YEAR ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", " )", - "RETURN", - " __Result" + ")" ] }, { @@ -210,7 +233,7 @@ "DisplayFolder": "To-date growth", "FormatString": "0.00%", "MultiLineExpression": [ - "DIVIDE (", + "DIVIDE ( ", " @@GETMEASURE( YOYTD ),", " @@GETMEASURE( PYTD )", ")" @@ -220,18 +243,16 @@ "Name": "PQTD", "DisplayFolder": "To-date growth", "MultiLineExpression": [ - "VAR __LastMonthInQuarterAvailable = MAX ( @_C-SQLBI_AttributeTypes-MonthOfQuarter_@ )", - "VAR __LastYearQuarterAvailable = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Quarters_@ )", - "VAR __PreviousYearQuarterAvailable = __LastYearQuarterAvailable - 1", - "VAR __Result =", + "IF (", + " [_ShowValueForDates],", " CALCULATE (", - " @@GETMEASURE(),", - " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", - " @_C-SQLBI_AttributeTypes-MonthOfQuarter_@ <= __LastMonthInQuarterAvailable,", - " @_C-SQLBI_AttributeTypes-Quarters_@ = __PreviousYearQuarterAvailable", + " @@GETMEASURE( QTD ),", + " CALCULATETABLE (", + " DATEADD ( @_C-SQLBI_AttributeTypes-Date_@, -1, QUARTER ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", " )", - "RETURN", - " __Result" + ")" ] }, { @@ -254,26 +275,65 @@ "DisplayFolder": "To-date growth", "FormatString": "0.00%", "MultiLineExpression": [ - "DIVIDE (", + "DIVIDE ( ", " @@GETMEASURE( QOQTD ),", " @@GETMEASURE( PQTD )", ")" ] }, + { + "Name": "PMTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " CALCULATE (", + " @@GETMEASURE( MTD ),", + " CALCULATETABLE (", + " DATEADD ( @_C-SQLBI_AttributeTypes-Date_@, -1, MONTH ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " )", + ")" + ] + }, + { + "Name": "MOMTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( MTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PMTD )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MOMTD %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE ( ", + " @@GETMEASURE( MOMTD ),", + " @@GETMEASURE( PMTD )", + ")" + ] + }, { "Name": "PYC", "DisplayFolder": "Growth over full period", "MultiLineExpression": [ - "VAR __CurrentYearNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Years_@ )", - "VAR __PreviousYearNumber = __CurrentYearNumber - 1", - "VAR __Result =", + "IF (", + " [_ShowValueForDates],", " CALCULATE (", " @@GETMEASURE(),", - " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", - " @_C-SQLBI_AttributeTypes-Years_@ = __PreviousYearNumber", + " PREVIOUSYEAR ( @_C-SQLBI_AttributeTypes-Date_@, @@GETDEFAULTVARIABLE(__FirstFiscalMonth) )", " )", - "RETURN", - " __Result" + ")" ] }, { @@ -292,11 +352,11 @@ ] }, { - "Name": "YTDOPY %", + "Name": "YDTOPY %", "DisplayFolder": "Growth over full period", "FormatString": "0.00%", "MultiLineExpression": [ - "DIVIDE (", + "DIVIDE ( ", " @@GETMEASURE( YTDOPY ),", " @@GETMEASURE( PYC )", ")" @@ -306,16 +366,13 @@ "Name": "PQC", "DisplayFolder": "Growth over full period", "MultiLineExpression": [ - "VAR __CurrentYearQuarterNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Quarters_@ )", - "VAR __PreviousYearQuarterNumber = __CurrentYearQuarterNumber - 1", - "VAR __Result =", + "IF (", + " [_ShowValueForDates],", " CALCULATE (", " @@GETMEASURE(),", - " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", - " @_C-SQLBI_AttributeTypes-Quarters_@ = __PreviousYearQuarterNumber", + " PREVIOUSQUARTER ( @_C-SQLBI_AttributeTypes-Date_@ )", " )", - "RETURN", - " __Result" + ")" ] }, { @@ -334,51 +391,84 @@ ] }, { - "Name": "QTDOPQ %", + "Name": "QDTOPQ %", "DisplayFolder": "Growth over full period", "FormatString": "0.00%", "MultiLineExpression": [ - "DIVIDE (", + "DIVIDE ( ", " @@GETMEASURE( QTDOPQ ),", " @@GETMEASURE( PQC )", ")" ] }, { - "Name": "MAT", - "DisplayFolder": "Moving annual growth", + "Name": "PMC", + "DisplayFolder": "Growth over full period", "MultiLineExpression": [ - "VAR __MonthsInRange = 12", - "VAR __LastMonthRange = MAX ( @_C-SQLBI_AttributeTypes-Months_@ )", - "VAR __FirstMonthRange = __LastMonthRange - __MonthsInRange + 1", - "VAR __Result =", + "IF (", + " [_ShowValueForDates],", " CALCULATE (", " @@GETMEASURE(),", - " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", - " @_C-SQLBI_AttributeTypes-Months_@ >= __FirstMonthRange", - " && @_C-SQLBI_AttributeTypes-Months_@ <= __LastMonthRange", + " PREVIOUSMONTH ( @_C-SQLBI_AttributeTypes-Date_@ )", + " )", + ")" + ] + }, + { + "Name": "MTDOPM", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( MTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PMC )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", " )", "RETURN", " __Result" ] }, { - "Name": "PYMAT", + "Name": "MTDOPM %", + "DisplayFolder": "Growth over full period", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE ( ", + " @@GETMEASURE( MTDOPM ),", + " @@GETMEASURE( PMC )", + ")" + ] + }, + { + "Name": "MAT", "DisplayFolder": "Moving annual growth", "MultiLineExpression": [ - "VAR __MonthsInRange = 12", - "VAR __LastMonthRange =", - " MAX ( @_C-SQLBI_AttributeTypes-Months_@ ) - __MonthsInRange", - "VAR __FirstMonthRange = __LastMonthRange - __MonthsInRange + 1", - "VAR __Result =", + "IF (", + " [_ShowValueForDates],", " CALCULATE (", " @@GETMEASURE(),", - " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", - " @_C-SQLBI_AttributeTypes-Months_@ >= __FirstMonthRange", - " && @_C-SQLBI_AttributeTypes-Months_@ <= __LastMonthRange", + " DATESINPERIOD (", + " @_C-SQLBI_AttributeTypes-Date_@,", + " MAX ( @_C-SQLBI_AttributeTypes-Date_@ ),", + " -1,", + " YEAR", + " )", " )", - "RETURN", - " __Result" + ")" + ] + }, + { + "Name": "PYMAT", + "DisplayFolder": "Moving annual growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " CALCULATE (", + " @@GETMEASURE( MAT ),", + " DATEADD ( @_C-SQLBI_AttributeTypes-Date_@, -1, YEAR )", + " )", + ")" ] }, { @@ -401,7 +491,7 @@ "DisplayFolder": "Moving annual growth", "FormatString": "0.00%", "MultiLineExpression": [ - "DIVIDE (", + "DIVIDE ( ", " @@GETMEASURE( MATG ),", " @@GETMEASURE( PYMAT )", ")" diff --git a/src/Dax.Template.TestUI/Templates/TimeIntelligence-03.json b/src/Dax.Template.TestUI/Templates/TimeIntelligence-03.json index 8b5ca61..1cb9882 100644 --- a/src/Dax.Template.TestUI/Templates/TimeIntelligence-03.json +++ b/src/Dax.Template.TestUI/Templates/TimeIntelligence-03.json @@ -1,152 +1,64 @@ { - "_comment": "Custom Fiscal Time Intelligence", + "_comment": "Monthly Time Intelligence (Calendar)", + "_comment1": "Create parameters to pass (and translate?) folder names (or part of folder names?)", "TargetTable": { - "SQLBI_CalendarType": "Fiscal" + "SQLBI_CalendarType": "Calendar" }, "TemplateAnnotations": { "SQLBI_Template": "TimeIntelligence", "SQLBI_TimeIntelligence": "Monthly", - "SQLBI_CalendarType": "Fiscal" + "SQLBI_CalendarType": "Calendar" }, "MeasureTemplates": [ { - "Name": "_ShowValueForDates", - "IsHidden": true, - "IsSingleInstance": true, - "MultiLineComment": [ - "Returns TRUE if the period selected is earlier", - "than the last period with data." - ], + "Name": "YTD", + "DisplayFolder": "To-date total", "MultiLineExpression": [ - "VAR __LastDateWithData =", + "VAR __LastMonthAvailable = MAX ( @_C-SQLBI_AttributeTypes-Months_@ )", + "VAR __LastYearAvailable = MAX ( @_C-SQLBI_AttributeTypes-Years_@ )", + "VAR __Result =", " CALCULATE (", - " @@GETMAXDATE(),", - " REMOVEFILTERS ()", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ <= __LastMonthAvailable,", + " @_C-SQLBI_AttributeTypes-Years_@ = __LastYearAvailable", " )", - "VAR __FirstDateVisible =", - " MIN ( @_C-SQLBI_AttributeTypes-FiscalDate_@ )", - "VAR __Result =", - " __FirstDateVisible <= __LastDateWithData", "RETURN", " __Result" ] }, - { - "Name": "YTD", - "DisplayFolder": "To-date total", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ )", - " VAR __LastFiscalYearAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ <= __LastDayAvailable,", - " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __LastFiscalYearAvailable", - " )", - " RETURN", - " __Result", - ")" - ] - }, { "Name": "QTD", "DisplayFolder": "To-date total", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ )", - " VAR __LastFiscalYearQuarterAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ <= __LastDayAvailable,", - " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __LastFiscalYearQuarterAvailable", - " )", - " RETURN", - " __Result", - ")" - ] - }, - { - "Name": "MTD", - "DisplayFolder": "To-date total", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ )", - " VAR __LastFiscalYearMonthAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ <= __LastDayAvailable,", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastFiscalYearMonthAvailable", - " )", - " RETURN", - " __Result", - ")" + "VAR __LastMonthAvailable = MAX ( @_C-SQLBI_AttributeTypes-Months_@ )", + "VAR __LastYearQuarterAvailable = MAX ( @_C-SQLBI_AttributeTypes-Quarters_@ )", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ <= __LastMonthAvailable,", + " @_C-SQLBI_AttributeTypes-Quarters_@ = __LastYearQuarterAvailable", + " )", + "RETURN", + " __Result" ] }, { "Name": "PY", "DisplayFolder": "Growth", "MultiLineExpression": [ - "VAR __MonthsOffset = 12", - "RETURN IF (", - " [_ShowValueForDates],", - " SUMX (", - " SUMMARIZE ( @_T-SQLBI_CalendarType-Fiscal_@, @_C-SQLBI_AttributeTypes-FiscalMonths_@ ),", - " VAR __CurrentYearMonthNumber = @_C-SQLBI_AttributeTypes-FiscalMonths_@", - " VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - __MonthsOffset", - " VAR __DaysOnMonth =", - " CALCULATE (", - " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", - " ALLEXCEPT (", - " @_T-SQLBI_CalendarType-Fiscal_@,", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@, -- Year Month granularity", - " @_CL-SQLBI_FilterSafe-True_@ -- Filter-safe columns", - " )", - " )", - " VAR __DaysSelected =", - " CALCULATE (", - " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " RETURN IF (", - " __DaysOnMonth = __DaysSelected,", - "", - " -- Selection of all days in the month", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber", - " ),", - "", - " -- Partial selection of days in a month", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber,", - " CALCULATETABLE (", - " VALUES ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", - " -- Removes filters from all the columns that do not have a day", - " -- granularity, keeping only Date and Day of Month Number", - " ALLEXCEPT (", - " @_T-SQLBI_CalendarType-Fiscal_@,", - " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@,", - " @_C-SQLBI_AttributeTypes-FiscalDate_@", - " ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __CurrentYearMonthNumber,", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " )", - " )", + "VAR __CurrentYearNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Years_@ )", + "VAR __PreviousYearNumber = __CurrentYearNumber - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-Years_@ = __PreviousYearNumber,", + " VALUES ( @_C-SQLBI_AttributeTypes-MonthOfYear_@ )", " )", - ")" + "RETURN", + " __Result" ] }, { @@ -179,58 +91,17 @@ "Name": "PQ", "DisplayFolder": "Growth", "MultiLineExpression": [ - "VAR __MonthsOffset = 3", - "RETURN IF (", - " [_ShowValueForDates],", - " SUMX (", - " SUMMARIZE ( @_T-SQLBI_CalendarType-Fiscal_@, @_C-SQLBI_AttributeTypes-FiscalMonths_@ ),", - " VAR __CurrentYearMonthNumber = @_C-SQLBI_AttributeTypes-FiscalMonths_@", - " VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - __MonthsOffset", - " VAR __DaysOnMonth =", - " CALCULATE (", - " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", - " ALLEXCEPT (", - " @_T-SQLBI_CalendarType-Fiscal_@,", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@, -- Year Month granularity", - " @_CL-SQLBI_FilterSafe-True_@ -- Filter-safe columns", - " )", - " )", - " VAR __DaysSelected =", - " CALCULATE (", - " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " RETURN IF (", - " __DaysOnMonth = __DaysSelected,", - "", - " -- Selection of all days in the month", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber", - " ),", - "", - " -- Partial selection of days in a month", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber,", - " CALCULATETABLE (", - " VALUES ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", - " -- Removes filters from all the columns that do not have a day", - " -- granularity, keeping only Date and Day of Month Number", - " ALLEXCEPT (", - " @_T-SQLBI_CalendarType-Fiscal_@,", - " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@,", - " @_C-SQLBI_AttributeTypes-FiscalDate_@", - " ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __CurrentYearMonthNumber,", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " )", - " )", + "VAR __CurrentYearQuarterNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Quarters_@ )", + "VAR __PreviousYearQuarterNumber = __CurrentYearQuarterNumber - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-Quarters_@ = __PreviousYearQuarterNumber,", + " VALUES ( @_C-SQLBI_AttributeTypes-MonthOfQuarter_@ )", " )", - ")" + "RETURN", + " __Result" ] }, { @@ -263,58 +134,16 @@ "Name": "PM", "DisplayFolder": "Growth", "MultiLineExpression": [ - "VAR __MonthsOffset = 1", - "RETURN IF (", - " [_ShowValueForDates],", - " SUMX (", - " SUMMARIZE ( @_T-SQLBI_CalendarType-Fiscal_@, @_C-SQLBI_AttributeTypes-FiscalMonths_@ ),", - " VAR __CurrentYearMonthNumber = @_C-SQLBI_AttributeTypes-FiscalMonths_@", - " VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - __MonthsOffset", - " VAR __DaysOnMonth =", - " CALCULATE (", - " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", - " ALLEXCEPT (", - " @_T-SQLBI_CalendarType-Fiscal_@,", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@, -- Year Month granularity", - " @_CL-SQLBI_FilterSafe-True_@ -- Filter-safe columns", - " )", - " )", - " VAR __DaysSelected =", - " CALCULATE (", - " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " RETURN IF (", - " __DaysOnMonth = __DaysSelected,", - "", - " -- Selection of all days in the month", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber", - " ),", - "", - " -- Partial selection of days in a month", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber,", - " CALCULATETABLE (", - " VALUES ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", - " -- Removes filters from all the columns that do not have a day", - " -- granularity, keeping only Date and Day of Month Number", - " ALLEXCEPT (", - " @_T-SQLBI_CalendarType-Fiscal_@,", - " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@,", - " @_C-SQLBI_AttributeTypes-FiscalDate_@", - " ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __CurrentYearMonthNumber,", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " )", - " )", + "VAR __CurrentYearMonthNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Months_@ )", + "VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __PreviousYearMonthNumber", " )", - ")" + "RETURN", + " __Result" ] }, { @@ -347,28 +176,18 @@ "Name": "PYTD", "DisplayFolder": "To-date growth", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __PreviousFiscalYear = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ) - 1", - " VAR __LastDayOfFiscalYearAvailable =", - " CALCULATE (", - " MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ ),", - " -- Removes filters from filter-safe columns", - " -- to get the last day with data selected in the report", - " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __PreviousFiscalYear,", - " @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ <= __LastDayOfFiscalYearAvailable,", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " RETURN", - " __Result", - ")" + "VAR __LastMonthInYearAvailable = MAX ( @_C-SQLBI_AttributeTypes-MonthOfYear_@ )", + "VAR __LastYearAvailable = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Years_@ )", + "VAR __PreviousYearAvailable = __LastYearAvailable - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-MonthOfYear_@ <= __LastMonthInYearAvailable,", + " @_C-SQLBI_AttributeTypes-Years_@ = __PreviousYearAvailable", + " )", + "RETURN", + " __Result" ] }, { @@ -401,64 +220,18 @@ "Name": "PQTD", "DisplayFolder": "To-date growth", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastMonthSelected =", - " MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", - " VAR __DaysOnLastMonth =", - " CALCULATE (", - " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected", - " )", - " VAR __DaysLastMonthSelected =", - " CALCULATE (", - " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE,", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected", - " )", - " VAR __LastDayOfMonthWithTransactions =", - " MAX (", - " -- End of month of any month", - " 31 * (__DaysOnLastMonth = __DaysLastMonthSelected),", - " -- or last day selected with data", - " CALCULATE (", - " MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", - " -- Removes filters from all of the filter-safe columns", - " -- to get the last day with data selected in the report", - " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected,", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " )", - " VAR __LastMonthInQuarterWithTransactions =", - " CALCULATE (", - " MAX ( @_C-SQLBI_AttributeTypes-FiscalMonthOfQuarter_@ ),", - " -- Removes filters from all of the filter-safe columns", - " -- to get the last day with data selected in the report", - " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " VAR __PreviousFiscalYearQuarter =", - " MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ) - 1", - " VAR __FilterQTD =", - " FILTER (", - " ALL ( @_C-SQLBI_AttributeTypes-FiscalMonthOfQuarter_@, @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", - " ISONORAFTER (", - " @_C-SQLBI_AttributeTypes-FiscalMonthOfQuarter_@, __LastMonthInQuarterWithTransactions, DESC,", - " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@, __LastDayOfMonthWithTransactions, DESC", - " )", - " )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __PreviousFiscalYearQuarter,", - " __FilterQTD", - " )", - " RETURN", - " __Result", - ")" + "VAR __LastMonthInQuarterAvailable = MAX ( @_C-SQLBI_AttributeTypes-MonthOfQuarter_@ )", + "VAR __LastYearQuarterAvailable = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Quarters_@ )", + "VAR __PreviousYearQuarterAvailable = __LastYearQuarterAvailable - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-MonthOfQuarter_@ <= __LastMonthInQuarterAvailable,", + " @_C-SQLBI_AttributeTypes-Quarters_@ = __PreviousYearQuarterAvailable", + " )", + "RETURN", + " __Result" ] }, { @@ -488,96 +261,21 @@ ] }, { - "Name": "PMTD", - "DisplayFolder": "To-date growth", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastMonthSelected =", - " MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", - " VAR __DaysOnLastMonth =", - " CALCULATE (", - " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected", - " )", - " VAR __DaysLastMonthSelected =", - " CALCULATE (", - " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE,", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected", - " )", - " VAR __LastDayOfMonthWithTransactions =", - " MAX (", - " -- End of month of any month", - " 31 * (__DaysOnLastMonth = __DaysLastMonthSelected),", - " -- or last day selected with data", - " CALCULATE (", - " MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", - " -- Removes filters from all of the filter-safe columns", - " -- to get the last day with data selected in the report", - " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected,", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " )", - " VAR __PreviousYearMonth = __LastMonthSelected - 1", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonth,", - " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ <= __LastDayOfMonthWithTransactions", - " )", - " RETURN", - " __Result", - ")" - ] - }, - { - "Name": "MOMTD", - "DisplayFolder": "To-date growth", + "Name": "PYC", + "DisplayFolder": "Growth over full period", "MultiLineExpression": [ - "VAR __ValueCurrentPeriod = @@GETMEASURE( MTD )", - "VAR __ValuePreviousPeriod = @@GETMEASURE( PMTD )", + "VAR __CurrentYearNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Years_@ )", + "VAR __PreviousYearNumber = __CurrentYearNumber - 1", "VAR __Result =", - " IF (", - " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", - " __ValueCurrentPeriod - __ValuePreviousPeriod", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-Years_@ = __PreviousYearNumber", " )", "RETURN", " __Result" ] }, - { - "Name": "MOMTD %", - "DisplayFolder": "To-date growth", - "FormatString": "0.00%", - "MultiLineExpression": [ - "DIVIDE (", - " @@GETMEASURE( MOMTD ),", - " @@GETMEASURE( PMTD )", - ")" - ] - }, - { - "Name": "PYC", - "DisplayFolder": "Growth over full period", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ),", - " VAR __PreviousFiscalYear = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ) - 1", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __PreviousFiscalYear", - " )", - " RETURN", - " __Result", - ")" - ] - }, { "Name": "YTDOPY", "DisplayFolder": "Growth over full period", @@ -595,7 +293,7 @@ }, { "Name": "YTDOPY %", - "DisplayFolder": "To-date growth", + "DisplayFolder": "Growth over full period", "FormatString": "0.00%", "MultiLineExpression": [ "DIVIDE (", @@ -608,18 +306,16 @@ "Name": "PQC", "DisplayFolder": "Growth over full period", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ),", - " VAR __PreviousFiscalYearQuarter = MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ) - 1", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __PreviousFiscalYearQuarter", - " )", - " RETURN", - " __Result", - ")" + "VAR __CurrentYearQuarterNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-Quarters_@ )", + "VAR __PreviousYearQuarterNumber = __CurrentYearQuarterNumber - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-Quarters_@ = __PreviousYearQuarterNumber", + " )", + "RETURN", + " __Result" ] }, { @@ -639,7 +335,7 @@ }, { "Name": "QTDOPQ %", - "DisplayFolder": "To-date growth", + "DisplayFolder": "Growth over full period", "FormatString": "0.00%", "MultiLineExpression": [ "DIVIDE (", @@ -649,152 +345,48 @@ ] }, { - "Name": "PMC", - "DisplayFolder": "Growth over full period", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ ),", - " VAR __PreviousFiscalYearMonth = MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ ) - 1", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousFiscalYearMonth", - " )", - " RETURN", - " __Result", - ")" - ] - }, - { - "Name": "MTDOPM", - "DisplayFolder": "Growth over full period", + "Name": "MAT", + "DisplayFolder": "Moving annual growth", "MultiLineExpression": [ - "VAR __ValueCurrentPeriod = @@GETMEASURE( MTD )", - "VAR __ValuePreviousPeriod = @@GETMEASURE( PMC )", + "VAR __MonthsInRange = 12", + "VAR __LastMonthRange = MAX ( @_C-SQLBI_AttributeTypes-Months_@ )", + "VAR __FirstMonthRange = __LastMonthRange - __MonthsInRange + 1", "VAR __Result =", - " IF (", - " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", - " __ValueCurrentPeriod - __ValuePreviousPeriod", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ >= __FirstMonthRange", + " && @_C-SQLBI_AttributeTypes-Months_@ <= __LastMonthRange", " )", "RETURN", " __Result" ] }, - { - "Name": "MTDOPM %", - "DisplayFolder": "To-date growth", - "FormatString": "0.00%", - "MultiLineExpression": [ - "DIVIDE (", - " @@GETMEASURE( MTDOPM ),", - " @@GETMEASURE( PMC )", - ")" - ] - }, - { - "Name": "MAT", - "DisplayFolder": "Moving annual growth", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayMAT = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", - " VAR __FirstDayMAT = INT ( EDATE ( __LastDayMAT + 1, -12 ) )", - " VAR Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", - " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", - " )", - " RETURN", - " Result", - ")" - ] - }, - { - "Name": "MAT-364", - "DisplayFolder": "Moving annual growth", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayMAT = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", - " VAR __FirstDayMAT = __LastDayMAT - 363", - " VAR Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", - " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", - " )", - " RETURN", - " Result", - ")" - ] - }, { "Name": "PYMAT", "DisplayFolder": "Moving annual growth", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", - " VAR __LastDayMAT = INT ( EDATE ( __LastDayAvailable, -12 ) )", - " VAR __FirstDayMAT = INT ( EDATE ( __LastDayAvailable + 1, -24 ) )", - " VAR Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", - " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", - " )", - " RETURN", - " Result", - ")" - ] - }, - { - "Name": "PYMAT-364", - "DisplayFolder": "Moving annual growth", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", - " VAR __LastDayMAT = __LastDayAvailable - 364", - " VAR __FirstDayMAT = __LastDayMAT - 363", - " VAR Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", - " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", - " )", - " RETURN", - " Result", - ")" - ] - }, - { - "Name": "MATG", - "DisplayFolder": "Growth over full period", - "MultiLineExpression": [ - "VAR __ValueCurrentPeriod = @@GETMEASURE( MAT )", - "VAR __ValuePreviousPeriod = @@GETMEASURE( PYMAT )", + "VAR __MonthsInRange = 12", + "VAR __LastMonthRange =", + " MAX ( @_C-SQLBI_AttributeTypes-Months_@ ) - __MonthsInRange", + "VAR __FirstMonthRange = __LastMonthRange - __MonthsInRange + 1", "VAR __Result =", - " IF (", - " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", - " __ValueCurrentPeriod - __ValuePreviousPeriod", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ >= __FirstMonthRange", + " && @_C-SQLBI_AttributeTypes-Months_@ <= __LastMonthRange", " )", "RETURN", " __Result" ] }, { - "Name": "MATG-364", - "DisplayFolder": "Growth over full period", + "Name": "MATG", + "DisplayFolder": "Moving annual growth", "MultiLineExpression": [ - "VAR __ValueCurrentPeriod = @@GETMEASURE( MAT-364 )", - "VAR __ValuePreviousPeriod = @@GETMEASURE( PYMAT-364 )", + "VAR __ValueCurrentPeriod = @@GETMEASURE( MAT )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYMAT )", "VAR __Result =", " IF (", " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", @@ -806,7 +398,7 @@ }, { "Name": "MATG %", - "DisplayFolder": "To-date growth", + "DisplayFolder": "Moving annual growth", "FormatString": "0.00%", "MultiLineExpression": [ "DIVIDE (", @@ -814,17 +406,6 @@ " @@GETMEASURE( PYMAT )", ")" ] - }, - { - "Name": "MATG-364 %", - "DisplayFolder": "To-date growth", - "FormatString": "0.00%", - "MultiLineExpression": [ - "DIVIDE (", - " @@GETMEASURE( MATG-364 ),", - " @@GETMEASURE( PYMAT-364 )", - ")" - ] } ] -} \ No newline at end of file +} diff --git a/src/Dax.Template.TestUI/Templates/TimeIntelligence-04.json b/src/Dax.Template.TestUI/Templates/TimeIntelligence-04.json index d6d8a2b..459eaf7 100644 --- a/src/Dax.Template.TestUI/Templates/TimeIntelligence-04.json +++ b/src/Dax.Template.TestUI/Templates/TimeIntelligence-04.json @@ -1,140 +1,64 @@ { - "_comment": "Weekly Time Intelligence", + "_comment": "Monthly Time Intelligence (Fiscal)", + "_comment1": "Create parameters to pass (and translate?) folder names (or part of folder names?)", "TargetTable": { - "SQLBI_CalendarType": "Weekly" + "SQLBI_CalendarType": "Fiscal" }, "TemplateAnnotations": { "SQLBI_Template": "TimeIntelligence", - "SQLBI_TimeIntelligence": "Weekly", - "SQLBI_CalendarType": "Weekly" + "SQLBI_TimeIntelligence": "Monthly", + "SQLBI_CalendarType": "Fiscal" }, "MeasureTemplates": [ { - "Name": "_ShowValueForDates", - "IsHidden": true, - "IsSingleInstance": true, - "MultiLineComment": [ - "Returns TRUE if the period selected is earlier", - "than the last period with data." - ], + "Name": "YTD", + "DisplayFolder": "To-date total", "MultiLineExpression": [ - "VAR __LastDateWithData =", + "VAR __LastMonthAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", + "VAR __LastYearAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ )", + "VAR __Result =", " CALCULATE (", - " @@GETMAXDATE(),", - " REMOVEFILTERS ()", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ <= __LastMonthAvailable,", + " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __LastYearAvailable", " )", - "VAR __FirstDateVisible =", - " MIN ( @_C-SQLBI_AttributeTypes-FiscalDate_@ )", - "VAR __Result =", - " __FirstDateVisible <= __LastDateWithData", "RETURN", " __Result" ] }, - { - "Name": "YTD", - "DisplayFolder": "To-date total", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ )", - " VAR __LastFiscalYearAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ <= __LastDayAvailable,", - " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __LastFiscalYearAvailable", - " )", - " RETURN", - " __Result", - ")" - ] - }, { "Name": "QTD", "DisplayFolder": "To-date total", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfQuarter_@ )", - " VAR __LastFiscalYearQuarterAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalDayOfQuarter_@ <= __LastDayAvailable,", - " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __LastFiscalYearQuarterAvailable", - " )", - " RETURN", - " __Result", - ")" - ] - }, - { - "Name": "MTD", - "DisplayFolder": "To-date total", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ )", - " VAR __LastFiscalYearMonthAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ <= __LastDayAvailable,", - " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastFiscalYearMonthAvailable", - " )", - " RETURN", - " __Result", - ")" - ] - }, - { - "Name": "WTD", - "DisplayFolder": "To-date total", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-DayOfWeek_@ )", - " VAR __LastFiscalYearWeekAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalWeeks_@ )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-DayOfWeek_@ <= __LastDayAvailable,", - " @_C-SQLBI_AttributeTypes-FiscalWeeks_@ = __LastFiscalYearWeekAvailable", - " )", - " RETURN", - " __Result", - ")" + "VAR __LastMonthAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", + "VAR __LastYearQuarterAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ )", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ <= __LastMonthAvailable,", + " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __LastYearQuarterAvailable", + " )", + "RETURN", + " __Result" ] }, { "Name": "PY", "DisplayFolder": "Growth", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " SUMX (", - " VALUES ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ),", - " VAR __CurrentFiscalYearNumber = @_C-SQLBI_AttributeTypes-FiscalYears_@", - " VAR __DaysSelected =", - " CALCULATETABLE (", - " VALUES ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ ),", - " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " RETURN", - " CALCULATE (", - " @@GETMEASURE(),", - " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __CurrentFiscalYearNumber - 1,", - " __DaysSelected,", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ )", - " )", + "VAR __CurrentYearNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-FiscalYears_@ )", + "VAR __PreviousYearNumber = __CurrentYearNumber - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __PreviousYearNumber,", + " VALUES ( @_C-SQLBI_AttributeTypes-FiscalMonthOfYear_@ )", " )", - ")" + "RETURN", + " __Result" ] }, { @@ -167,26 +91,17 @@ "Name": "PQ", "DisplayFolder": "Growth", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " SUMX (", - " VALUES ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ),", - " VAR __CurrentFiscalYearQuarterNumber = @_C-SQLBI_AttributeTypes-FiscalQuarters_@", - " VAR __DaysSelected =", - " CALCULATETABLE (", - " VALUES ( @_C-SQLBI_AttributeTypes-FiscalDayOfQuarter_@ ),", - " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " RETURN", - " CALCULATE (", - " @@GETMEASURE(),", - " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __CurrentFiscalYearQuarterNumber - 1,", - " __DaysSelected,", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ )", - " )", + "VAR __CurrentYearQuarterNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ )", + "VAR __PreviousYearQuarterNumber = __CurrentYearQuarterNumber - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __PreviousYearQuarterNumber,", + " VALUES ( @_C-SQLBI_AttributeTypes-FiscalMonthOfQuarter_@ )", " )", - ")" + "RETURN", + " __Result" ] }, { @@ -216,37 +131,27 @@ ] }, { - "Name": "PW", + "Name": "PM", "DisplayFolder": "Growth", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " SUMX (", - " VALUES ( @_C-SQLBI_AttributeTypes-FiscalWeeks_@ ),", - " VAR __CurrentFiscalYearWeekNumber = @_C-SQLBI_AttributeTypes-FiscalWeeks_@", - " VAR __DaysSelected =", - " CALCULATETABLE (", - " VALUES ( @_C-SQLBI_AttributeTypes-DayOfWeek_@ ),", - " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " RETURN", - " CALCULATE (", - " @@GETMEASURE(),", - " @_C-SQLBI_AttributeTypes-FiscalWeeks_@ = __CurrentFiscalYearWeekNumber - 1,", - " __DaysSelected,", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ )", - " )", + "VAR __CurrentYearMonthNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", + "VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber", " )", - ")" + "RETURN", + " __Result" ] }, { - "Name": "WOW", + "Name": "MOM", "DisplayFolder": "Growth", "MultiLineExpression": [ "VAR __ValueCurrentPeriod = @@GETMEASURE()", - "VAR __ValuePreviousPeriod = @@GETMEASURE( PW )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PM )", "VAR __Result =", " IF (", " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", @@ -257,13 +162,13 @@ ] }, { - "Name": "WOW %", + "Name": "MOM %", "DisplayFolder": "Growth", "FormatString": "0.00%", "MultiLineExpression": [ "DIVIDE (", - " @@GETMEASURE( WOW ),", - " @@GETMEASURE( PW )", + " @@GETMEASURE( MOM ),", + " @@GETMEASURE( PM )", ")" ] }, @@ -271,28 +176,18 @@ "Name": "PYTD", "DisplayFolder": "To-date growth", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __PreviousFiscalYear = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ) - 1", - " VAR __LastDayOfFiscalYearAvailable =", - " CALCULATE (", - " MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ ),", - " -- Removes filters from filter-safe columns", - " -- to get the last day with data selected in the report", - " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __PreviousFiscalYear,", - " @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ <= __LastDayOfFiscalYearAvailable,", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " RETURN", - " __Result", - ")" + "VAR __LastMonthInYearAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalMonthOfYear_@ )", + "VAR __LastYearAvailable = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-FiscalYears_@ )", + "VAR __PreviousYearAvailable = __LastYearAvailable - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonthOfYear_@ <= __LastMonthInYearAvailable,", + " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __PreviousYearAvailable", + " )", + "RETURN", + " __Result" ] }, { @@ -325,28 +220,18 @@ "Name": "PQTD", "DisplayFolder": "To-date growth", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __PreviousFiscalYearQuarter = MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ) - 1", - " VAR __LastDayOfFiscalYearQuarterAvailable =", - " CALCULATE (", - " MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfQuarter_@ ),", - " -- Removes filters from filter-safe columns", - " -- to get the last day with data selected in the report", - " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __PreviousFiscalYearQuarter,", - " @_C-SQLBI_AttributeTypes-FiscalDayOfQuarter_@ <= __LastDayOfFiscalYearQuarterAvailable,", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " RETURN", - " __Result", - ")" + "VAR __LastMonthInQuarterAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalMonthOfQuarter_@ )", + "VAR __LastYearQuarterAvailable = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ )", + "VAR __PreviousYearQuarterAvailable = __LastYearQuarterAvailable - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonthOfQuarter_@ <= __LastMonthInQuarterAvailable,", + " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __PreviousYearQuarterAvailable", + " )", + "RETURN", + " __Result" ] }, { @@ -376,77 +261,21 @@ ] }, { - "Name": "PWTD", - "DisplayFolder": "To-date growth", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __PreviousFiscalYearWeek = MAX ( @_C-SQLBI_AttributeTypes-FiscalWeeks_@ ) - 1", - " VAR __LastDayOfWeekAvailable =", - " CALCULATE (", - " MAX ( @_C-SQLBI_AttributeTypes-DayOfWeek_@ ),", - " -- Removes filters from filter-safe columns", - " -- to get the last day with data selected in the report", - " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalWeeks_@ = __PreviousFiscalYearWeek,", - " @_C-SQLBI_AttributeTypes-DayOfWeek_@ <= __LastDayOfWeekAvailable,", - " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", - " )", - " RETURN", - " __Result", - ")" - ] - }, - { - "Name": "WOWTD", - "DisplayFolder": "To-date growth", + "Name": "PYC", + "DisplayFolder": "Growth over full period", "MultiLineExpression": [ - "VAR __ValueCurrentPeriod = @@GETMEASURE( WTD )", - "VAR __ValuePreviousPeriod = @@GETMEASURE( PWTD )", + "VAR __CurrentYearNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-FiscalYears_@ )", + "VAR __PreviousYearNumber = __CurrentYearNumber - 1", "VAR __Result =", - " IF (", - " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", - " __ValueCurrentPeriod - __ValuePreviousPeriod", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __PreviousYearNumber", " )", "RETURN", " __Result" ] }, - { - "Name": "WOWTD %", - "DisplayFolder": "To-date growth", - "FormatString": "0.00%", - "MultiLineExpression": [ - "DIVIDE (", - " @@GETMEASURE( WOWTD ),", - " @@GETMEASURE( PWTD )", - ")" - ] - }, - { - "Name": "PYC", - "DisplayFolder": "Growth over full period", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ),", - " VAR __PreviousFiscalYear = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ) - 1", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __PreviousFiscalYear", - " )", - " RETURN", - " __Result", - ")" - ] - }, { "Name": "YTDOPY", "DisplayFolder": "Growth over full period", @@ -464,7 +293,7 @@ }, { "Name": "YTDOPY %", - "DisplayFolder": "To-date growth", + "DisplayFolder": "Growth over full period", "FormatString": "0.00%", "MultiLineExpression": [ "DIVIDE (", @@ -477,18 +306,16 @@ "Name": "PQC", "DisplayFolder": "Growth over full period", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ),", - " VAR __PreviousFiscalYearQuarter = MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ) - 1", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __PreviousFiscalYearQuarter", - " )", - " RETURN", - " __Result", - ")" + "VAR __CurrentYearQuarterNumber = SELECTEDVALUE ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ )", + "VAR __PreviousYearQuarterNumber = __CurrentYearQuarterNumber - 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __PreviousYearQuarterNumber", + " )", + "RETURN", + " __Result" ] }, { @@ -508,7 +335,7 @@ }, { "Name": "QTDOPQ %", - "DisplayFolder": "To-date growth", + "DisplayFolder": "Growth over full period", "FormatString": "0.00%", "MultiLineExpression": [ "DIVIDE (", @@ -518,96 +345,48 @@ ] }, { - "Name": "PWC", - "DisplayFolder": "Growth over full period", - "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalWeeks_@ ),", - " VAR __PreviousFiscalYearWeek = MAX ( @_C-SQLBI_AttributeTypes-FiscalWeeks_@ ) - 1", - " VAR __Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-FiscalWeeks_@ = __PreviousFiscalYearWeek", - " )", - " RETURN", - " __Result", - ")" - ] - }, - { - "Name": "QTDOPQ", - "DisplayFolder": "Growth over full period", + "Name": "MAT", + "DisplayFolder": "Moving annual growth", "MultiLineExpression": [ - "VAR __ValueCurrentPeriod = @@GETMEASURE( QTD )", - "VAR __ValuePreviousPeriod = @@GETMEASURE( PQC )", + "VAR __MonthsInRange = 12", + "VAR __LastMonthRange = MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", + "VAR __FirstMonthRange = __LastMonthRange - __MonthsInRange + 1", "VAR __Result =", - " IF (", - " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", - " __ValueCurrentPeriod - __ValuePreviousPeriod", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ >= __FirstMonthRange", + " && @_C-SQLBI_AttributeTypes-FiscalMonths_@ <= __LastMonthRange", " )", "RETURN", " __Result" ] }, { - "Name": "QTDOPQ %", - "DisplayFolder": "To-date growth", - "FormatString": "0.00%", - "MultiLineExpression": [ - "DIVIDE (", - " @@GETMEASURE( QTDOPQ ),", - " @@GETMEASURE( PWC )", - ")" - ] - }, - { - "Name": "MAT-364", + "Name": "PYMAT", "DisplayFolder": "Moving annual growth", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayMAT = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", - " VAR __FirstDayMAT = __LastDayMAT - 363", - " VAR Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", - " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", - " )", - " RETURN", - " Result", - ")" + "VAR __MonthsInRange = 12", + "VAR __LastMonthRange =", + " MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ ) - __MonthsInRange", + "VAR __FirstMonthRange = __LastMonthRange - __MonthsInRange + 1", + "VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " REMOVEFILTERS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ >= __FirstMonthRange", + " && @_C-SQLBI_AttributeTypes-FiscalMonths_@ <= __LastMonthRange", + " )", + "RETURN", + " __Result" ] }, { - "Name": "PYMAT-364", + "Name": "MATG", "DisplayFolder": "Moving annual growth", "MultiLineExpression": [ - "IF (", - " [_ShowValueForDates],", - " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", - " VAR __LastDayMAT = __LastDayAvailable - 364", - " VAR __FirstDayMAT = __LastDayMAT - 363", - " VAR Result =", - " CALCULATE (", - " @@GETMEASURE(),", - " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", - " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", - " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", - " )", - " RETURN", - " Result", - ")" - ] - }, - { - "Name": "MATG-364", - "DisplayFolder": "Growth over full period", - "MultiLineExpression": [ - "VAR __ValueCurrentPeriod = @@GETMEASURE( MAT-364 )", - "VAR __ValuePreviousPeriod = @@GETMEASURE( PYMAT-364 )", + "VAR __ValueCurrentPeriod = @@GETMEASURE( MAT )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYMAT )", "VAR __Result =", " IF (", " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", @@ -618,15 +397,15 @@ ] }, { - "Name": "MATG-364 %", - "DisplayFolder": "To-date growth", + "Name": "MATG %", + "DisplayFolder": "Moving annual growth", "FormatString": "0.00%", "MultiLineExpression": [ "DIVIDE (", - " @@GETMEASURE( MATG-364 ),", - " @@GETMEASURE( PYMAT-364 )", + " @@GETMEASURE( MATG ),", + " @@GETMEASURE( PYMAT )", ")" ] } ] -} \ No newline at end of file +} diff --git a/src/Dax.Template.TestUI/Templates/TimeIntelligence-05.json b/src/Dax.Template.TestUI/Templates/TimeIntelligence-05.json new file mode 100644 index 0000000..11fa010 --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/TimeIntelligence-05.json @@ -0,0 +1,831 @@ +{ + "$schema": "https://raw.githubusercontent.com/sql-bi/Bravo/alberto/templateWorkspace/src/Assets/TemplateDevelopment/Schemas/measures-template.schema.json", + "_comment": "Custom Time Intelligence", + "TargetTable": { + "SQLBI_CalendarType": "Calendar" + }, + "TemplateAnnotations": { + "SQLBI_Template": "TimeIntelligence", + "SQLBI_TimeIntelligence": "Monthly", + "SQLBI_CalendarType": "Calendar" + }, + "MeasureTemplates": [ + { + "Name": "_ShowValueForDates", + "IsHidden": true, + "IsSingleInstance": true, + "MultiLineComment": [ + "Returns TRUE if the period selected is earlier", + "than the last period with data." + ], + "MultiLineExpression": [ + "VAR __LastDateWithData =", + " CALCULATE (", + " @@GETMAXDATE(),", + " REMOVEFILTERS ()", + " )", + "VAR __FirstDateVisible =", + " MIN ( @_C-SQLBI_AttributeTypes-Date_@ )", + "VAR __Result =", + " __FirstDateVisible <= __LastDateWithData", + "RETURN", + " __Result" + ] + }, + { + "Name": "YTD", + "DisplayFolder": "To-date total", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-DayOfYear_@ )", + " VAR __LastYearAvailable = MAX ( @_C-SQLBI_AttributeTypes-Years_@ )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DayOfYear_@ <= __LastDayAvailable,", + " @_C-SQLBI_AttributeTypes-Years_@ = __LastYearAvailable", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "QTD", + "DisplayFolder": "To-date total", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-DayOfYear_@ )", + " VAR __LastYearQuarterAvailable = MAX ( @_C-SQLBI_AttributeTypes-Quarters_@ )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DayOfYear_@ <= __LastDayAvailable,", + " @_C-SQLBI_AttributeTypes-Quarters_@ = __LastYearQuarterAvailable", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "MTD", + "DisplayFolder": "To-date total", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-DayOfMonth_@ )", + " VAR __LastYearMonthAvailable = MAX ( @_C-SQLBI_AttributeTypes-Months_@ )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DayOfMonth_@ <= __LastDayAvailable,", + " @_C-SQLBI_AttributeTypes-Months_@ = __LastYearMonthAvailable", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "PY", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __MonthsOffset = 12", + "RETURN IF (", + " [_ShowValueForDates],", + " SUMX (", + " SUMMARIZE ( @_T-SQLBI_CalendarType-Calendar_@, @_C-SQLBI_AttributeTypes-Months_@ ),", + " VAR __CurrentYearMonthNumber = @_C-SQLBI_AttributeTypes-Months_@", + " VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - __MonthsOffset", + " VAR __DaysOnMonth =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Calendar_@,", + " @_C-SQLBI_AttributeTypes-Months_@, -- Year Month granularity", + " @_CL-SQLBI_FilterSafe-True_@ -- Filter-safe columns", + " )", + " )", + " VAR __DaysSelected =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN IF (", + " __DaysOnMonth = __DaysSelected,", + "", + " -- Selection of all days in the month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __PreviousYearMonthNumber", + " ),", + "", + " -- Partial selection of days in a month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __PreviousYearMonthNumber,", + " CALCULATETABLE (", + " VALUES ( @_C-SQLBI_AttributeTypes-DayOfMonth_@ ),", + " -- Removes filters from all the columns that do not have a day", + " -- granularity, keeping only Date and Day of Month Number", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Calendar_@,", + " @_C-SQLBI_AttributeTypes-DayOfMonth_@,", + " @_C-SQLBI_AttributeTypes-Date_@", + " ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __CurrentYearMonthNumber,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " )", + " )", + " )", + ")" + ] + }, + { + "Name": "YOY", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE()", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PY )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "YOY %", + "DisplayFolder": "Growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( YOY ),", + " @@GETMEASURE( PY )", + ")" + ] + }, + { + "Name": "PQ", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __MonthsOffset = 3", + "RETURN IF (", + " [_ShowValueForDates],", + " SUMX (", + " SUMMARIZE ( @_T-SQLBI_CalendarType-Calendar_@, @_C-SQLBI_AttributeTypes-Months_@ ),", + " VAR __CurrentYearMonthNumber = @_C-SQLBI_AttributeTypes-Months_@", + " VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - __MonthsOffset", + " VAR __DaysOnMonth =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Calendar_@,", + " @_C-SQLBI_AttributeTypes-Months_@, -- Year Month granularity", + " @_CL-SQLBI_FilterSafe-True_@ -- Filter-safe columns", + " )", + " )", + " VAR __DaysSelected =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN IF (", + " __DaysOnMonth = __DaysSelected,", + "", + " -- Selection of all days in the month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __PreviousYearMonthNumber", + " ),", + "", + " -- Partial selection of days in a month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __PreviousYearMonthNumber,", + " CALCULATETABLE (", + " VALUES ( @_C-SQLBI_AttributeTypes-DayOfMonth_@ ),", + " -- Removes filters from all the columns that do not have a day", + " -- granularity, keeping only Date and Day of Month Number", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Calendar_@,", + " @_C-SQLBI_AttributeTypes-DayOfMonth_@,", + " @_C-SQLBI_AttributeTypes-Date_@", + " ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __CurrentYearMonthNumber,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " )", + " )", + " )", + ")" + ] + }, + { + "Name": "QOQ", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE()", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PQ )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "QOQ %", + "DisplayFolder": "Growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( QOQ ),", + " @@GETMEASURE( PQ )", + ")" + ] + }, + { + "Name": "PM", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __MonthsOffset = 1", + "RETURN IF (", + " [_ShowValueForDates],", + " SUMX (", + " SUMMARIZE ( @_T-SQLBI_CalendarType-Calendar_@, @_C-SQLBI_AttributeTypes-Months_@ ),", + " VAR __CurrentYearMonthNumber = @_C-SQLBI_AttributeTypes-Months_@", + " VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - __MonthsOffset", + " VAR __DaysOnMonth =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Calendar_@,", + " @_C-SQLBI_AttributeTypes-Months_@, -- Year Month granularity", + " @_CL-SQLBI_FilterSafe-True_@ -- Filter-safe columns", + " )", + " )", + " VAR __DaysSelected =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN IF (", + " __DaysOnMonth = __DaysSelected,", + "", + " -- Selection of all days in the month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __PreviousYearMonthNumber", + " ),", + "", + " -- Partial selection of days in a month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __PreviousYearMonthNumber,", + " CALCULATETABLE (", + " VALUES ( @_C-SQLBI_AttributeTypes-DayOfMonth_@ ),", + " -- Removes filters from all the columns that do not have a day", + " -- granularity, keeping only Date and Day of Month Number", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Calendar_@,", + " @_C-SQLBI_AttributeTypes-DayOfMonth_@,", + " @_C-SQLBI_AttributeTypes-Date_@", + " ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __CurrentYearMonthNumber,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " )", + " )", + " )", + ")" + ] + }, + { + "Name": "MOM", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE()", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PM )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MOM %", + "DisplayFolder": "Growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( MOM ),", + " @@GETMEASURE( PM )", + ")" + ] + }, + { + "Name": "PYTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __PreviousYear = MAX ( @_C-SQLBI_AttributeTypes-Years_@ ) - 1", + " VAR __LastDayOfYearAvailable =", + " CALCULATE (", + " MAX ( @_C-SQLBI_AttributeTypes-DayOfYear_@ ),", + " -- Removes filters from filter-safe columns", + " -- to get the last day with data selected in the report", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Years_@ = __PreviousYear,", + " @_C-SQLBI_AttributeTypes-DayOfYear_@ <= __LastDayOfYearAvailable,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "YOYTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( YTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYTD )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "YOYTD %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( YOYTD ),", + " @@GETMEASURE( PYTD )", + ")" + ] + }, + { + "Name": "PQTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastMonthSelected =", + " MAX ( @_C-SQLBI_AttributeTypes-Months_@ )", + " VAR __DaysOnLastMonth =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __LastMonthSelected", + " )", + " VAR __DaysLastMonthSelected =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE,", + " @_C-SQLBI_AttributeTypes-Months_@ = __LastMonthSelected", + " )", + " VAR __LastDayOfMonthWithTransactions =", + " MAX (", + " -- End of month of any month", + " 31 * (__DaysOnLastMonth = __DaysLastMonthSelected),", + " -- or last day selected with data", + " CALCULATE (", + " MAX ( @_C-SQLBI_AttributeTypes-DayOfMonth_@ ),", + " -- Removes filters from all of the filter-safe columns", + " -- to get the last day with data selected in the report", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __LastMonthSelected,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " )", + " VAR __LastMonthInQuarterWithTransactions =", + " CALCULATE (", + " MAX ( @_C-SQLBI_AttributeTypes-MonthOfQuarter_@ ),", + " -- Removes filters from all of the filter-safe columns", + " -- to get the last day with data selected in the report", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " VAR __PreviousYearQuarter =", + " MAX ( @_C-SQLBI_AttributeTypes-Quarters_@ ) - 1", + " VAR __FilterQTD =", + " FILTER (", + " ALL ( @_C-SQLBI_AttributeTypes-MonthOfQuarter_@, @_C-SQLBI_AttributeTypes-DayOfMonth_@ ),", + " ISONORAFTER (", + " @_C-SQLBI_AttributeTypes-MonthOfQuarter_@, __LastMonthInQuarterWithTransactions, DESC,", + " @_C-SQLBI_AttributeTypes-DayOfMonth_@, __LastDayOfMonthWithTransactions, DESC", + " )", + " )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Quarters_@ = __PreviousYearQuarter,", + " __FilterQTD", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "QOQTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( QTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PQTD )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "QOQTD %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( QOQTD ),", + " @@GETMEASURE( PQTD )", + ")" + ] + }, + { + "Name": "PMTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastMonthSelected =", + " MAX ( @_C-SQLBI_AttributeTypes-Months_@ )", + " VAR __DaysOnLastMonth =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __LastMonthSelected", + " )", + " VAR __DaysLastMonthSelected =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Calendar_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE,", + " @_C-SQLBI_AttributeTypes-Months_@ = __LastMonthSelected", + " )", + " VAR __LastDayOfMonthWithTransactions =", + " MAX (", + " -- End of month of any month", + " 31 * (__DaysOnLastMonth = __DaysLastMonthSelected),", + " -- or last day selected with data", + " CALCULATE (", + " MAX ( @_C-SQLBI_AttributeTypes-DayOfMonth_@ ),", + " -- Removes filters from all of the filter-safe columns", + " -- to get the last day with data selected in the report", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __LastMonthSelected,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " )", + " VAR __PreviousYearMonth = __LastMonthSelected - 1", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __PreviousYearMonth,", + " @_C-SQLBI_AttributeTypes-DayOfMonth_@ <= __LastDayOfMonthWithTransactions", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "MOMTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( MTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PMTD )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MOMTD %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( MOMTD ),", + " @@GETMEASURE( PMTD )", + ")" + ] + }, + { + "Name": "PYC", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-Years_@ ),", + " VAR __PreviousYear = MAX ( @_C-SQLBI_AttributeTypes-Years_@ ) - 1", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Years_@ = __PreviousYear", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "YTDOPY", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( YTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYC )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "YTDOPY %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( YTDOPY ),", + " @@GETMEASURE( PYC )", + ")" + ] + }, + { + "Name": "PQC", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-Quarters_@ ),", + " VAR __PreviousYearQuarter = MAX ( @_C-SQLBI_AttributeTypes-Quarters_@ ) - 1", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Quarters_@ = __PreviousYearQuarter", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "QTDOPQ", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( QTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PQC )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "QTDOPQ %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( QTDOPQ ),", + " @@GETMEASURE( PQC )", + ")" + ] + }, + { + "Name": "PMC", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-Months_@ ),", + " VAR __PreviousYearMonth = MAX ( @_C-SQLBI_AttributeTypes-Months_@ ) - 1", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-Months_@ = __PreviousYearMonth", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "MTDOPM", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( MTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PMC )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MTDOPM %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( MTDOPM ),", + " @@GETMEASURE( PMC )", + ")" + ] + }, + { + "Name": "MAT", + "DisplayFolder": "Moving annual growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayMAT = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", + " VAR __FirstDayMAT = INT ( EDATE ( __LastDayMAT + 1, -12 ) )", + " VAR Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", + " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", + " )", + " RETURN", + " Result", + ")" + ] + }, + { + "Name": "MAT-364", + "DisplayFolder": "Moving annual growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayMAT = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", + " VAR __FirstDayMAT = __LastDayMAT - 363", + " VAR Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", + " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", + " )", + " RETURN", + " Result", + ")" + ] + }, + { + "Name": "PYMAT", + "DisplayFolder": "Moving annual growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", + " VAR __LastDayMAT = INT ( EDATE ( __LastDayAvailable, -12 ) )", + " VAR __FirstDayMAT = INT ( EDATE ( __LastDayAvailable + 1, -24 ) )", + " VAR Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", + " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", + " )", + " RETURN", + " Result", + ")" + ] + }, + { + "Name": "PYMAT-364", + "DisplayFolder": "Moving annual growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", + " VAR __LastDayMAT = __LastDayAvailable - 364", + " VAR __FirstDayMAT = __LastDayMAT - 363", + " VAR Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Calendar_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", + " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", + " )", + " RETURN", + " Result", + ")" + ] + }, + { + "Name": "MATG", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( MAT )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYMAT )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MATG-364", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( MAT-364 )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYMAT-364 )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MATG %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( MATG ),", + " @@GETMEASURE( PYMAT )", + ")" + ] + }, + { + "Name": "MATG-364 %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( MATG-364 ),", + " @@GETMEASURE( PYMAT-364 )", + ")" + ] + } + ] +} \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/TimeIntelligence-06.json b/src/Dax.Template.TestUI/Templates/TimeIntelligence-06.json new file mode 100644 index 0000000..5da5e0f --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/TimeIntelligence-06.json @@ -0,0 +1,831 @@ +{ + "$schema": "https://raw.githubusercontent.com/sql-bi/Bravo/alberto/templateWorkspace/src/Assets/TemplateDevelopment/Schemas/measures-template.schema.json", + "_comment": "Custom Fiscal Time Intelligence", + "TargetTable": { + "SQLBI_CalendarType": "Fiscal" + }, + "TemplateAnnotations": { + "SQLBI_Template": "TimeIntelligence", + "SQLBI_TimeIntelligence": "Monthly", + "SQLBI_CalendarType": "Fiscal" + }, + "MeasureTemplates": [ + { + "Name": "_ShowValueForDates", + "IsHidden": true, + "IsSingleInstance": true, + "MultiLineComment": [ + "Returns TRUE if the period selected is earlier", + "than the last period with data." + ], + "MultiLineExpression": [ + "VAR __LastDateWithData =", + " CALCULATE (", + " @@GETMAXDATE(),", + " REMOVEFILTERS ()", + " )", + "VAR __FirstDateVisible =", + " MIN ( @_C-SQLBI_AttributeTypes-FiscalDate_@ )", + "VAR __Result =", + " __FirstDateVisible <= __LastDateWithData", + "RETURN", + " __Result" + ] + }, + { + "Name": "YTD", + "DisplayFolder": "To-date total", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ )", + " VAR __LastFiscalYearAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ <= __LastDayAvailable,", + " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __LastFiscalYearAvailable", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "QTD", + "DisplayFolder": "To-date total", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ )", + " VAR __LastFiscalYearQuarterAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ <= __LastDayAvailable,", + " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __LastFiscalYearQuarterAvailable", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "MTD", + "DisplayFolder": "To-date total", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ )", + " VAR __LastFiscalYearMonthAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ <= __LastDayAvailable,", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastFiscalYearMonthAvailable", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "PY", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __MonthsOffset = 12", + "RETURN IF (", + " [_ShowValueForDates],", + " SUMX (", + " SUMMARIZE ( @_T-SQLBI_CalendarType-Fiscal_@, @_C-SQLBI_AttributeTypes-FiscalMonths_@ ),", + " VAR __CurrentYearMonthNumber = @_C-SQLBI_AttributeTypes-FiscalMonths_@", + " VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - __MonthsOffset", + " VAR __DaysOnMonth =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Fiscal_@,", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@, -- Year Month granularity", + " @_CL-SQLBI_FilterSafe-True_@ -- Filter-safe columns", + " )", + " )", + " VAR __DaysSelected =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN IF (", + " __DaysOnMonth = __DaysSelected,", + "", + " -- Selection of all days in the month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber", + " ),", + "", + " -- Partial selection of days in a month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber,", + " CALCULATETABLE (", + " VALUES ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", + " -- Removes filters from all the columns that do not have a day", + " -- granularity, keeping only Date and Day of Month Number", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Fiscal_@,", + " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@,", + " @_C-SQLBI_AttributeTypes-FiscalDate_@", + " ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __CurrentYearMonthNumber,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " )", + " )", + " )", + ")" + ] + }, + { + "Name": "YOY", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE()", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PY )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "YOY %", + "DisplayFolder": "Growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( YOY ),", + " @@GETMEASURE( PY )", + ")" + ] + }, + { + "Name": "PQ", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __MonthsOffset = 3", + "RETURN IF (", + " [_ShowValueForDates],", + " SUMX (", + " SUMMARIZE ( @_T-SQLBI_CalendarType-Fiscal_@, @_C-SQLBI_AttributeTypes-FiscalMonths_@ ),", + " VAR __CurrentYearMonthNumber = @_C-SQLBI_AttributeTypes-FiscalMonths_@", + " VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - __MonthsOffset", + " VAR __DaysOnMonth =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Fiscal_@,", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@, -- Year Month granularity", + " @_CL-SQLBI_FilterSafe-True_@ -- Filter-safe columns", + " )", + " )", + " VAR __DaysSelected =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN IF (", + " __DaysOnMonth = __DaysSelected,", + "", + " -- Selection of all days in the month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber", + " ),", + "", + " -- Partial selection of days in a month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber,", + " CALCULATETABLE (", + " VALUES ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", + " -- Removes filters from all the columns that do not have a day", + " -- granularity, keeping only Date and Day of Month Number", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Fiscal_@,", + " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@,", + " @_C-SQLBI_AttributeTypes-FiscalDate_@", + " ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __CurrentYearMonthNumber,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " )", + " )", + " )", + ")" + ] + }, + { + "Name": "QOQ", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE()", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PQ )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "QOQ %", + "DisplayFolder": "Growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( QOQ ),", + " @@GETMEASURE( PQ )", + ")" + ] + }, + { + "Name": "PM", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __MonthsOffset = 1", + "RETURN IF (", + " [_ShowValueForDates],", + " SUMX (", + " SUMMARIZE ( @_T-SQLBI_CalendarType-Fiscal_@, @_C-SQLBI_AttributeTypes-FiscalMonths_@ ),", + " VAR __CurrentYearMonthNumber = @_C-SQLBI_AttributeTypes-FiscalMonths_@", + " VAR __PreviousYearMonthNumber = __CurrentYearMonthNumber - __MonthsOffset", + " VAR __DaysOnMonth =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Fiscal_@,", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@, -- Year Month granularity", + " @_CL-SQLBI_FilterSafe-True_@ -- Filter-safe columns", + " )", + " )", + " VAR __DaysSelected =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN IF (", + " __DaysOnMonth = __DaysSelected,", + "", + " -- Selection of all days in the month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber", + " ),", + "", + " -- Partial selection of days in a month", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonthNumber,", + " CALCULATETABLE (", + " VALUES ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", + " -- Removes filters from all the columns that do not have a day", + " -- granularity, keeping only Date and Day of Month Number", + " ALLEXCEPT (", + " @_T-SQLBI_CalendarType-Fiscal_@,", + " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@,", + " @_C-SQLBI_AttributeTypes-FiscalDate_@", + " ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __CurrentYearMonthNumber,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " )", + " )", + " )", + ")" + ] + }, + { + "Name": "MOM", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE()", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PM )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MOM %", + "DisplayFolder": "Growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( MOM ),", + " @@GETMEASURE( PM )", + ")" + ] + }, + { + "Name": "PYTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __PreviousFiscalYear = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ) - 1", + " VAR __LastDayOfFiscalYearAvailable =", + " CALCULATE (", + " MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ ),", + " -- Removes filters from filter-safe columns", + " -- to get the last day with data selected in the report", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __PreviousFiscalYear,", + " @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ <= __LastDayOfFiscalYearAvailable,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "YOYTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( YTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYTD )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "YOYTD %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( YOYTD ),", + " @@GETMEASURE( PYTD )", + ")" + ] + }, + { + "Name": "PQTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastMonthSelected =", + " MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", + " VAR __DaysOnLastMonth =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected", + " )", + " VAR __DaysLastMonthSelected =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE,", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected", + " )", + " VAR __LastDayOfMonthWithTransactions =", + " MAX (", + " -- End of month of any month", + " 31 * (__DaysOnLastMonth = __DaysLastMonthSelected),", + " -- or last day selected with data", + " CALCULATE (", + " MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", + " -- Removes filters from all of the filter-safe columns", + " -- to get the last day with data selected in the report", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " )", + " VAR __LastMonthInQuarterWithTransactions =", + " CALCULATE (", + " MAX ( @_C-SQLBI_AttributeTypes-FiscalMonthOfQuarter_@ ),", + " -- Removes filters from all of the filter-safe columns", + " -- to get the last day with data selected in the report", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " VAR __PreviousFiscalYearQuarter =", + " MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ) - 1", + " VAR __FilterQTD =", + " FILTER (", + " ALL ( @_C-SQLBI_AttributeTypes-FiscalMonthOfQuarter_@, @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", + " ISONORAFTER (", + " @_C-SQLBI_AttributeTypes-FiscalMonthOfQuarter_@, __LastMonthInQuarterWithTransactions, DESC,", + " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@, __LastDayOfMonthWithTransactions, DESC", + " )", + " )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __PreviousFiscalYearQuarter,", + " __FilterQTD", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "QOQTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( QTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PQTD )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "QOQTD %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( QOQTD ),", + " @@GETMEASURE( PQTD )", + ")" + ] + }, + { + "Name": "PMTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastMonthSelected =", + " MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", + " VAR __DaysOnLastMonth =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected", + " )", + " VAR __DaysLastMonthSelected =", + " CALCULATE (", + " COUNTROWS ( @_T-SQLBI_CalendarType-Fiscal_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE,", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected", + " )", + " VAR __LastDayOfMonthWithTransactions =", + " MAX (", + " -- End of month of any month", + " 31 * (__DaysOnLastMonth = __DaysLastMonthSelected),", + " -- or last day selected with data", + " CALCULATE (", + " MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ ),", + " -- Removes filters from all of the filter-safe columns", + " -- to get the last day with data selected in the report", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastMonthSelected,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " )", + " VAR __PreviousYearMonth = __LastMonthSelected - 1", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousYearMonth,", + " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ <= __LastDayOfMonthWithTransactions", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "MOMTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( MTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PMTD )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MOMTD %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( MOMTD ),", + " @@GETMEASURE( PMTD )", + ")" + ] + }, + { + "Name": "PYC", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ),", + " VAR __PreviousFiscalYear = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ) - 1", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __PreviousFiscalYear", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "YTDOPY", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( YTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYC )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "YTDOPY %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( YTDOPY ),", + " @@GETMEASURE( PYC )", + ")" + ] + }, + { + "Name": "PQC", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ),", + " VAR __PreviousFiscalYearQuarter = MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ) - 1", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __PreviousFiscalYearQuarter", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "QTDOPQ", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( QTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PQC )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "QTDOPQ %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( QTDOPQ ),", + " @@GETMEASURE( PQC )", + ")" + ] + }, + { + "Name": "PMC", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ ),", + " VAR __PreviousFiscalYearMonth = MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ ) - 1", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __PreviousFiscalYearMonth", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "MTDOPM", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( MTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PMC )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MTDOPM %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( MTDOPM ),", + " @@GETMEASURE( PMC )", + ")" + ] + }, + { + "Name": "MAT", + "DisplayFolder": "Moving annual growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayMAT = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", + " VAR __FirstDayMAT = INT ( EDATE ( __LastDayMAT + 1, -12 ) )", + " VAR Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", + " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", + " )", + " RETURN", + " Result", + ")" + ] + }, + { + "Name": "MAT-364", + "DisplayFolder": "Moving annual growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayMAT = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", + " VAR __FirstDayMAT = __LastDayMAT - 363", + " VAR Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", + " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", + " )", + " RETURN", + " Result", + ")" + ] + }, + { + "Name": "PYMAT", + "DisplayFolder": "Moving annual growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", + " VAR __LastDayMAT = INT ( EDATE ( __LastDayAvailable, -12 ) )", + " VAR __FirstDayMAT = INT ( EDATE ( __LastDayAvailable + 1, -24 ) )", + " VAR Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", + " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", + " )", + " RETURN", + " Result", + ")" + ] + }, + { + "Name": "PYMAT-364", + "DisplayFolder": "Moving annual growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", + " VAR __LastDayMAT = __LastDayAvailable - 364", + " VAR __FirstDayMAT = __LastDayMAT - 363", + " VAR Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Fiscal_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", + " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", + " )", + " RETURN", + " Result", + ")" + ] + }, + { + "Name": "MATG", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( MAT )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYMAT )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MATG-364", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( MAT-364 )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYMAT-364 )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MATG %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( MATG ),", + " @@GETMEASURE( PYMAT )", + ")" + ] + }, + { + "Name": "MATG-364 %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( MATG-364 ),", + " @@GETMEASURE( PYMAT-364 )", + ")" + ] + } + ] +} \ No newline at end of file diff --git a/src/Dax.Template.TestUI/Templates/TimeIntelligence-07.json b/src/Dax.Template.TestUI/Templates/TimeIntelligence-07.json new file mode 100644 index 0000000..d6d8a2b --- /dev/null +++ b/src/Dax.Template.TestUI/Templates/TimeIntelligence-07.json @@ -0,0 +1,632 @@ +{ + "_comment": "Weekly Time Intelligence", + "TargetTable": { + "SQLBI_CalendarType": "Weekly" + }, + "TemplateAnnotations": { + "SQLBI_Template": "TimeIntelligence", + "SQLBI_TimeIntelligence": "Weekly", + "SQLBI_CalendarType": "Weekly" + }, + "MeasureTemplates": [ + { + "Name": "_ShowValueForDates", + "IsHidden": true, + "IsSingleInstance": true, + "MultiLineComment": [ + "Returns TRUE if the period selected is earlier", + "than the last period with data." + ], + "MultiLineExpression": [ + "VAR __LastDateWithData =", + " CALCULATE (", + " @@GETMAXDATE(),", + " REMOVEFILTERS ()", + " )", + "VAR __FirstDateVisible =", + " MIN ( @_C-SQLBI_AttributeTypes-FiscalDate_@ )", + "VAR __Result =", + " __FirstDateVisible <= __LastDateWithData", + "RETURN", + " __Result" + ] + }, + { + "Name": "YTD", + "DisplayFolder": "To-date total", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ )", + " VAR __LastFiscalYearAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ <= __LastDayAvailable,", + " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __LastFiscalYearAvailable", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "QTD", + "DisplayFolder": "To-date total", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfQuarter_@ )", + " VAR __LastFiscalYearQuarterAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalDayOfQuarter_@ <= __LastDayAvailable,", + " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __LastFiscalYearQuarterAvailable", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "MTD", + "DisplayFolder": "To-date total", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ )", + " VAR __LastFiscalYearMonthAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalMonths_@ )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalDayOfMonth_@ <= __LastDayAvailable,", + " @_C-SQLBI_AttributeTypes-FiscalMonths_@ = __LastFiscalYearMonthAvailable", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "WTD", + "DisplayFolder": "To-date total", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-DayOfWeek_@ )", + " VAR __LastFiscalYearWeekAvailable = MAX ( @_C-SQLBI_AttributeTypes-FiscalWeeks_@ )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DayOfWeek_@ <= __LastDayAvailable,", + " @_C-SQLBI_AttributeTypes-FiscalWeeks_@ = __LastFiscalYearWeekAvailable", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "PY", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " SUMX (", + " VALUES ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ),", + " VAR __CurrentFiscalYearNumber = @_C-SQLBI_AttributeTypes-FiscalYears_@", + " VAR __DaysSelected =", + " CALCULATETABLE (", + " VALUES ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ ),", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN", + " CALCULATE (", + " @@GETMEASURE(),", + " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __CurrentFiscalYearNumber - 1,", + " __DaysSelected,", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ )", + " )", + " )", + ")" + ] + }, + { + "Name": "YOY", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE()", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PY )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "YOY %", + "DisplayFolder": "Growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( YOY ),", + " @@GETMEASURE( PY )", + ")" + ] + }, + { + "Name": "PQ", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " SUMX (", + " VALUES ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ),", + " VAR __CurrentFiscalYearQuarterNumber = @_C-SQLBI_AttributeTypes-FiscalQuarters_@", + " VAR __DaysSelected =", + " CALCULATETABLE (", + " VALUES ( @_C-SQLBI_AttributeTypes-FiscalDayOfQuarter_@ ),", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN", + " CALCULATE (", + " @@GETMEASURE(),", + " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __CurrentFiscalYearQuarterNumber - 1,", + " __DaysSelected,", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ )", + " )", + " )", + ")" + ] + }, + { + "Name": "QOQ", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE()", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PQ )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "QOQ %", + "DisplayFolder": "Growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( QOQ ),", + " @@GETMEASURE( PQ )", + ")" + ] + }, + { + "Name": "PW", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " SUMX (", + " VALUES ( @_C-SQLBI_AttributeTypes-FiscalWeeks_@ ),", + " VAR __CurrentFiscalYearWeekNumber = @_C-SQLBI_AttributeTypes-FiscalWeeks_@", + " VAR __DaysSelected =", + " CALCULATETABLE (", + " VALUES ( @_C-SQLBI_AttributeTypes-DayOfWeek_@ ),", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN", + " CALCULATE (", + " @@GETMEASURE(),", + " @_C-SQLBI_AttributeTypes-FiscalWeeks_@ = __CurrentFiscalYearWeekNumber - 1,", + " __DaysSelected,", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ )", + " )", + " )", + ")" + ] + }, + { + "Name": "WOW", + "DisplayFolder": "Growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE()", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PW )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "WOW %", + "DisplayFolder": "Growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( WOW ),", + " @@GETMEASURE( PW )", + ")" + ] + }, + { + "Name": "PYTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __PreviousFiscalYear = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ) - 1", + " VAR __LastDayOfFiscalYearAvailable =", + " CALCULATE (", + " MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ ),", + " -- Removes filters from filter-safe columns", + " -- to get the last day with data selected in the report", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __PreviousFiscalYear,", + " @_C-SQLBI_AttributeTypes-FiscalDayOfYear_@ <= __LastDayOfFiscalYearAvailable,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "YOYTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( YTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYTD )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "YOYTD %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( YOYTD ),", + " @@GETMEASURE( PYTD )", + ")" + ] + }, + { + "Name": "PQTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __PreviousFiscalYearQuarter = MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ) - 1", + " VAR __LastDayOfFiscalYearQuarterAvailable =", + " CALCULATE (", + " MAX ( @_C-SQLBI_AttributeTypes-FiscalDayOfQuarter_@ ),", + " -- Removes filters from filter-safe columns", + " -- to get the last day with data selected in the report", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __PreviousFiscalYearQuarter,", + " @_C-SQLBI_AttributeTypes-FiscalDayOfQuarter_@ <= __LastDayOfFiscalYearQuarterAvailable,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "QOQTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( QTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PQTD )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "QOQTD %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( QOQTD ),", + " @@GETMEASURE( PQTD )", + ")" + ] + }, + { + "Name": "PWTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __PreviousFiscalYearWeek = MAX ( @_C-SQLBI_AttributeTypes-FiscalWeeks_@ ) - 1", + " VAR __LastDayOfWeekAvailable =", + " CALCULATE (", + " MAX ( @_C-SQLBI_AttributeTypes-DayOfWeek_@ ),", + " -- Removes filters from filter-safe columns", + " -- to get the last day with data selected in the report", + " REMOVEFILTERS ( @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalWeeks_@ = __PreviousFiscalYearWeek,", + " @_C-SQLBI_AttributeTypes-DayOfWeek_@ <= __LastDayOfWeekAvailable,", + " @_C-SQLBI_AttributeTypes-DateDuration_@ = TRUE", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "WOWTD", + "DisplayFolder": "To-date growth", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( WTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PWTD )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "WOWTD %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( WOWTD ),", + " @@GETMEASURE( PWTD )", + ")" + ] + }, + { + "Name": "PYC", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ),", + " VAR __PreviousFiscalYear = MAX ( @_C-SQLBI_AttributeTypes-FiscalYears_@ ) - 1", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalYears_@ = __PreviousFiscalYear", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "YTDOPY", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( YTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYC )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "YTDOPY %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( YTDOPY ),", + " @@GETMEASURE( PYC )", + ")" + ] + }, + { + "Name": "PQC", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ),", + " VAR __PreviousFiscalYearQuarter = MAX ( @_C-SQLBI_AttributeTypes-FiscalQuarters_@ ) - 1", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalQuarters_@ = __PreviousFiscalYearQuarter", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "QTDOPQ", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( QTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PQC )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "QTDOPQ %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( QTDOPQ ),", + " @@GETMEASURE( PQC )", + ")" + ] + }, + { + "Name": "PWC", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates] && HASONEVALUE ( @_C-SQLBI_AttributeTypes-FiscalWeeks_@ ),", + " VAR __PreviousFiscalYearWeek = MAX ( @_C-SQLBI_AttributeTypes-FiscalWeeks_@ ) - 1", + " VAR __Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-FiscalWeeks_@ = __PreviousFiscalYearWeek", + " )", + " RETURN", + " __Result", + ")" + ] + }, + { + "Name": "QTDOPQ", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( QTD )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PQC )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "QTDOPQ %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( QTDOPQ ),", + " @@GETMEASURE( PWC )", + ")" + ] + }, + { + "Name": "MAT-364", + "DisplayFolder": "Moving annual growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayMAT = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", + " VAR __FirstDayMAT = __LastDayMAT - 363", + " VAR Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", + " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", + " )", + " RETURN", + " Result", + ")" + ] + }, + { + "Name": "PYMAT-364", + "DisplayFolder": "Moving annual growth", + "MultiLineExpression": [ + "IF (", + " [_ShowValueForDates],", + " VAR __LastDayAvailable = MAX ( @_C-SQLBI_AttributeTypes-ManufacturingDate_@ )", + " VAR __LastDayMAT = __LastDayAvailable - 364", + " VAR __FirstDayMAT = __LastDayMAT - 363", + " VAR Result =", + " CALCULATE (", + " @@GETMEASURE(),", + " ALLEXCEPT ( @_T-SQLBI_CalendarType-Weekly_@, @_CL-SQLBI_FilterSafe-True_@ ),", + " @_C-SQLBI_AttributeTypes-ManufacturingDate_@ >= __FirstDayMAT", + " && @_C-SQLBI_AttributeTypes-ManufacturingDate_@ <= __LastDayMAT", + " )", + " RETURN", + " Result", + ")" + ] + }, + { + "Name": "MATG-364", + "DisplayFolder": "Growth over full period", + "MultiLineExpression": [ + "VAR __ValueCurrentPeriod = @@GETMEASURE( MAT-364 )", + "VAR __ValuePreviousPeriod = @@GETMEASURE( PYMAT-364 )", + "VAR __Result =", + " IF (", + " NOT ISBLANK ( __ValueCurrentPeriod ) && NOT ISBLANK ( __ValuePreviousPeriod ),", + " __ValueCurrentPeriod - __ValuePreviousPeriod", + " )", + "RETURN", + " __Result" + ] + }, + { + "Name": "MATG-364 %", + "DisplayFolder": "To-date growth", + "FormatString": "0.00%", + "MultiLineExpression": [ + "DIVIDE (", + " @@GETMEASURE( MATG-364 ),", + " @@GETMEASURE( PYMAT-364 )", + ")" + ] + } + ] +} \ No newline at end of file