paginated report
3 TopicsHow to create dynamic filter in DAX query
Hello, I want to dynamically filter my data in PBI Report Builder using DAX expression. The columns in the filter will be added dynamically based on what the user selects in the report. It is a embedded paginated report with a PBI Semantic model as it's dataset. The PBI Semantic Model dataset is created using DirectQuery. I am sharing the semantic model between PBI Report and Paginated Report. Paginated Report is required to export the tabular report data. I am using the following DAX : DEFINE VAR filters = IF(NOT(ISBLANK(@param1)), "MyTable[col1]=" & @param1, BLANK()) EVALUATE FILTER(MyTable, filters) I get the following error: The query contains the 'param1' parameter, which is not declared. Please note that I have created a Query Parameter named param1 in the DataSet properties and associated it with respectvie report parameter. The report parameters are passed to the report in the payload. Need help. Thank youSolved2.1KViews0likes3CommentsHourly Production by machine - Paginated Report
Hello to all. I'm a newcomer to DAX and started with a problem of converting an old PDF report created in C# to paginated report on Power BI. The data I have is similar to this: Machine | ProductionTimestamp | ProductionHour ----------------------------------------------------- M1 | 01/01/2022 06:35:12 | 06 M1 | 01/01/2022 09:30:12 | 09 M1 | 01/01/2022 22:55:12 | 22 M2 | 01/01/2022 09:55:12 | 09 M2 | 01/01/2022 22:35:12 | 22 M3 | 01/01/2022 07:35:12 | 07 M3 | 01/01/2022 08:35:12 | 08 I need generate a daily paginated report with this information: hourly production by machine (in the TODAY()-1 date), between 04h and 0h. Production is the count of ProductionTimestamp in each hour of day. ProductionHour | M1 | M2 | M3 04 | 0 | 0 | 0 05 | 0 | 0 | 0 06 | 1 | 0 | 0 07 | 0 | 0 | 1 08 | 0 | 0 | 1 09 | 1 | 1 | 0 10 | 0 | 0 | 0 ... 22 | 1 | 1 | 0 23 | 0 | 0 | 0 To the moment, I have the hourly production for 1 machine, but I don't know how to go ahead and add a column per machine (in the same query). My present code: EVALUATE SUMMARIZECOLUMNS ( 'FACT-ProducaoBanburys'[HoraProducao], 'FACT-ProducaoBanburys'[Maquina_ID], FILTER ( VALUES ( 'FACT-ProducaoBanburys'[DataProducao] ), 'FACT-ProducaoBanburys'[DataProducao] = TODAY () - 1 ), FILTER ( VALUES ( 'FACT-ProducaoBanburys'[Maquina_ID] ), 'FACT-ProducaoBanburys'[Maquina_ID] = 1 ), "M1", COUNT ( 'FACT-ProducaoBanburys'[Data] ) ) ORDER BY 'FACT-ProducaoBanburys'[HoraProducao] And the result is: HoraProducao | M1 6 | 4 7 | 12 8 | 16 9 | 12 10 | 24 ... Thanks for any help.Solved856Views0likes2CommentsRemoving Leading Zeros from Parameter in Paginated report
Hello, I am trying to find a way to remove leading zeros from parameter in paginated report. I have the same column used in table and I was able to remove 0s by providing "Cint" function in column expression (= Cint(Field...)). Is there any way I can remove those 0s from parameter? Or can anyone help to write a DAX code to remove 0s while preparing the dataset?Solved1.6KViews0likes1Comment