Forum Discussion

JennyMilf's avatar
JennyMilf
Helper I
1 year ago
Solved

Paginated Report

Hello everyone,

I want to create a dataset in Paginated Report (the data source-connected semantic model in Power BI services). My case study is: when the user clicks the value in the PeriodType parameter, the dataset will get the corresponding data

Ex: PeriodType = 'WTD', my expectation data is the result of VAR __FWview

Link my current query: Query Dataset 

Now, I have 2 issues:

1. Error like the photo below:

2. I'm not sure if after I fixed the multiple-column issue, the data will get right with my case study.

Can anyone consult me? I would greatly appreciate your assistance. Thank you!

  • Anonymous's avatar
    Anonymous
    1 year ago

    Thank you rohit1991 

    Hi, JennyMilf

     I think your expression must first conform to the syntax specs of DAX.
    I looked at your DAX query and I think you should connect to your model on DAX studio and run it to make sure it works before putting it into Report builder so that the tool can alert you to which statement is problematic:

    DAX studio supports simulation parameters. Or you can replace your @Company, @Comp_NonComp, @Period with a value. Make sure your statement is grammatically correct before putting it in.

     

    Best Regards

    Jianpeng Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

4 Replies

  • Hi JennyMilf 

     

    This kind of error usually means your DAX query or dataset is returning multiple columns or values, but Paginated Report expects just a single value or a single column.

    Here’s how to fix it:

    1. If you need a single value (like for a card or parameter): Use an aggregated measure (like SUM, AVERAGE, MAX, etc.) in your semantic model.
      For example:VAR _FWview = CALCULATE(SUM(Sales[Amount]), Sales[PeriodType] = "WTD")
      RETURN _FWview

    2. If you’re returning a table, make sure it’s just one column:
      Use SELECTCOLUMNS or a similar DAX function to limit the output: EVALUATE
      SELECTCOLUMNS(
      FILTER(Sales, Sales[PeriodType] = "WTD"),
      "WTD Sales", Sales[Amount]
      )

    3. If you’re troubleshooting, test your DAX in DAX Studio first to see if the result is what you expect.
    • JennyMilf's avatar
      JennyMilf
      Helper I

      1. I can not use an aggregation. Because the semantic model includes the DAX measure that calculates logic SUM, AVG,... So I think I just need to select it intothe Paginated Report.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thank you rohit1991 

    Hi, JennyMilf

     I think your expression must first conform to the syntax specs of DAX.
    I looked at your DAX query and I think you should connect to your model on DAX studio and run it to make sure it works before putting it into Report builder so that the tool can alert you to which statement is problematic:

    DAX studio supports simulation parameters. Or you can replace your @Company, @Comp_NonComp, @Period with a value. Make sure your statement is grammatically correct before putting it in.

     

    Best Regards

    Jianpeng Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, JennyMilf 

    I wish you all the best. Previously we have provided a solution to help you solve the problem. Since we haven't heard back from you yet, I'd like to confirm if you've successfully resolved this issue or if you need further help?
    If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
    If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
    Thank you for your patience and look forward to hearing from you.

     

     

    Best Regards

    Jianpeng Li