Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hello,
Im trying to get some of my Power BI Desktop files into a Paginated Power BI Report Builder file.
I used my Power BI service Dataset Connection along with the Performance Analyzer DAX method from the Desktop and inserted into Query designer.
Is there a way I can add a DAX statement in that adds a Parameter to the report based on " 'data TOSAIncident'[Correct date]
In the orginal desktop file I am using a slicer to filter so there is no actual parameter.
Here is the DAX Code:
// DAX Query
DEFINE
VAR __DS0FilterTable =
FILTER(
KEEPFILTERS(VALUES('data ControllerLog'[Nature Of Call])),
NOT(ISBLANK('data ControllerLog'[Nature Of Call]))
)
VAR __DS0Core =
SELECTCOLUMNS(
KEEPFILTERS(
FILTER(
KEEPFILTERS(
SUMMARIZECOLUMNS(
'data TOSAIncident'[Reported By],
'data ControllerLog'[Nature Of Call],
'data ControllerLog'[Action Taken],
'data TOSAIncident'[Occurrence Time Stamp],
'def TrolleySegments'[Segment Name],
'v_CombinedLocationSegments'[Location Description],
'data TOSAIncident'[Correct date],
__DS0FilterTable,
"Color_Code", IGNORE('def TrolleySegments'[Color Code]),
"CountRowsdata_TOSAIncident", CALCULATE(COUNTROWS('data TOSAIncident')),
"CountRowsdata_ControllerLog", CALCULATE(COUNTROWS('data ControllerLog'))
)
),
OR(
OR(
OR(
OR(
OR(
OR(
NOT(ISBLANK('data TOSAIncident'[Reported By])),
NOT(ISBLANK('data ControllerLog'[Nature Of Call]))
),
NOT(ISBLANK('data ControllerLog'[Action Taken]))
),
NOT(ISBLANK('data TOSAIncident'[Occurrence Time Stamp]))
),
NOT(ISBLANK('def TrolleySegments'[Segment Name]))
),
NOT(ISBLANK('v_CombinedLocationSegments'[Location Description]))
),
NOT(ISBLANK('data TOSAIncident'[Correct date]))
)
)
),
"'data TOSAIncident'[Reported By]", 'data TOSAIncident'[Reported By],
"'data ControllerLog'[Nature Of Call]", 'data ControllerLog'[Nature Of Call],
"'data ControllerLog'[Action Taken]", 'data ControllerLog'[Action Taken],
"'data TOSAIncident'[Occurrence Time Stamp]", 'data TOSAIncident'[Occurrence Time Stamp],
"'def TrolleySegments'[Segment Name]", 'def TrolleySegments'[Segment Name],
"'v_CombinedLocationSegments'[Location Description]", 'v_CombinedLocationSegments'[Location Description],
"'data TOSAIncident'[Correct date]", 'data TOSAIncident'[Correct date],
"Color_Code", [Color_Code]
)
VAR __DS0PrimaryWindowed =
TOPN(
501,
__DS0Core,
'data TOSAIncident'[Occurrence Time Stamp],
1,
'data TOSAIncident'[Reported By],
1,
'data ControllerLog'[Nature Of Call],
1,
'data ControllerLog'[Action Taken],
1,
'def TrolleySegments'[Segment Name],
1,
'v_CombinedLocationSegments'[Location Description],
1,
'data TOSAIncident'[Correct date],
1
)
EVALUATE
__DS0PrimaryWindowed
ORDER BY
'data TOSAIncident'[Occurrence Time Stamp],
'data TOSAIncident'[Reported By],
'data ControllerLog'[Nature Of Call],
'data ControllerLog'[Action Taken],
'def TrolleySegments'[Segment Name],
'v_CombinedLocationSegments'[Location Description],
'data TOSAIncident'[Correct date]
Hi @amandabus21
I found a thread that may be helpful:
Solved: Using Paginated Report Builder and Existing DAX fo... - Microsoft Power BI Community
Solved: Power BI DAX query to Paginated report - Microsoft Power BI Community
Best Regards,
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.