Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
amandabus21
Helper V
Helper V

DAX Into a Paginated Report

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]

 

 

 

 

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors