Hi all,
Realise this is probably bordering on a Power BI forum query, so please say so if this is the case! Here's my issue;
I have a fairly detailed dashboard in Power BI; this draws on local data, but is published weekly to the online service. I am trying to create a PA flow that can gather summaries of this data also on a weekly basis to populate a sharepoint list.
The data takes the form of a single dataset (that I'm interested in anyway) and I'm trying to summarise by two different columns - example below:
Project | Status | ID |
Watford Street | Pending | 1 |
Piccadilly | Closed | 2 |
Gregg Road | Closed | 3 |
Watford Street | Closed | 4 |
Watford Street | In progress | 5 |
Gregg Road | In progress | 6 |
Picccadilly | Pending | 7 |
Watford Street | Pending | 8 |
Gregg Road | Pending | 9 |
Essentially I'm trying get a single summarised value (as a count) out of this sort of data to generate an output per DAX query
DAX query one: 'Watford Street and Pending': '2'
DAX query two: 'Watford Street and In progress': '1'
etc..
Null results can be resolved easily using an expression and I can easily enough use an expression to "chop up" the output of the DAX query just down to the number itself (although obviously, if there was a way for the output to be literally just the number that would be ideal).
I've done quite a lot of Googling on this and tried many solutions, some of which seem to work but only temporarily and when the data updates (and this is confirmed to be present in PBI online by using a simple matrix on the PBI dashboard) it doesn't pull it through.
This is the query I'm using at the moment, but as said, it doesn't really work. The data table is called 'Snags'.
// DAX Query
DEFINE
VAR __DS0FilterTable =
TREATAS({"Pending"}, 'Snags'[Status])
VAR __DS0FilterTable2 =
FILTER(
KEEPFILTERS(VALUES('Snags'[Project])),
'Snags'[Project] IN {"[Watford Street]"} )
EVALUATE
SUMMARIZECOLUMNS(
__DS0FilterTable,
__DS0FilterTable2,
"CountProject", IGNORE(CALCULATE(COUNTA('Snags'[Project])))
)
Any help would be appreciated (and to be honest, if there's a way of simplifying the DAX query for the Power BI "Run a query against a dataset" action then I'm all for it!
Cheers
BG
Edit: I've now discovered (quite painfully) what the cause of the non-updating was; we use a common account for PBI but we've had sign-in issues recently and it had reverted to the personal credentials, so the PBI dashboard had published to a different account, hence the query was running on old data! Lesson learnt.
That said, if anyone does have any insight on how to make the query cleaner I'd certainly be all ears!
Cheers
Michael E. Gernaey
14
Super User 2025 Season 1
stampcoin
14
Churchy
12