Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Power BI and rolling windows #8600

Open
kraft6 opened this issue Aug 20, 2024 · 3 comments
Open

Power BI and rolling windows #8600

kraft6 opened this issue Aug 20, 2024 · 3 comments
Assignees
Labels
question The issue is a question. Please use Stack Overflow for questions.

Comments

@kraft6
Copy link

kraft6 commented Aug 20, 2024

I am testing with Power BI connecting to Cube Dev. I am having problems with the rolling windows and the amounts/calculations are not calculating correctly. With Power BI, I am not sure how to pass in the date range and granularity with the query? Do you have any thoughts or experience in this space. Below is what is in my yml file, I was following this example: https://cube.dev/docs/guides/recipes/data-modeling/period-over-period.

Previous month is always the same a current month. Is there a way I can just do this through SQL?

name: current_month_sum
sql: totalprice
type: sum
rolling_window:
trailing: 1 month
offset: end

name: previous_month_sum
sql: totalprice
type: sum
rolling_window:
trailing: 1 month
offset: start

name: month_over_month_ratio
sql: "{current_month_sum} / {previous_month_sum}"
type: number
@kraft6 kraft6 added the question The issue is a question. Please use Stack Overflow for questions. label Aug 20, 2024
@igorlukanin igorlukanin self-assigned this Aug 20, 2024
@kraft6
Copy link
Author

kraft6 commented Sep 4, 2024

Just wondering if is any status on this or work around??

@igorlukanin
Copy link
Member

Hi @kraft6 👋

Are you testing a raw SQL API connection? In any case, I believe you just have to drag the time dimension (date column) to the filters page in Power BI.

@igorlukanin
Copy link
Member

@kraft6 Did my advice help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue is a question. Please use Stack Overflow for questions.
Projects
None yet
Development

No branches or pull requests

2 participants